Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## 2.14 (December 2019)
- Splash screen
- Shortcut to shared by link files from side menu (contribution)
- Use new server parameter to set a minimum number of characters for searching users, groups or federated shares
- End of support for SAML authentication.
- UI improvements, including:
+ Mix files and folders when sorting them by date (contribution) or size
+ Redesign logs view with new tabs, filters and share options (contribution)
+ Resize cloud image in side menu to not overlap the new side menu options
- Bug fixes, including:
+ Avoid overwritten files with the same name during copy or move operations
+ Retry camera uploads when recovering wifi connectivity and "Upload with wifi only" option is enabled

## 2.13.1 (October 2019)
- Improve oAuth user experience flow and wording when token expires or becomes invalid

Expand Down
2 changes: 1 addition & 1 deletion owncloud-android-library
4 changes: 2 additions & 2 deletions owncloudApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ android {

testInstrumentationRunner "com.owncloud.android.utils.OCTestAndroidJUnitRunner"

versionCode = 21300100
versionName = "2.13.1"
versionCode = 21400000
versionName = "2.14"

buildConfigField "String", gitRemote, "\"" + getGitOriginRemote() + "\""
buildConfigField "String", commitSHA1, "\"" + getLatestGitHash() + "\""
Expand Down
33 changes: 19 additions & 14 deletions owncloudApp/src/main/java/com/owncloud/android/MainApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import com.owncloud.android.ui.activity.PatternLockActivity
import com.owncloud.android.ui.activity.WhatsNewActivity
import org.koin.android.ext.koin.androidContext
import org.koin.core.context.startKoin
import org.koin.core.context.stopKoin

/**
* Main Application of the project
Expand All @@ -64,7 +65,6 @@ import org.koin.core.context.startKoin
* classes
*/
class MainApp : MultiDexApplication() {

override fun onCreate() {
super.onCreate()

Expand Down Expand Up @@ -164,19 +164,7 @@ class MainApp : MultiDexApplication() {
}
})

startKoin {
androidContext(applicationContext)
modules(
listOf(
commonModule,
viewModelModule,
useCaseModule,
repositoryModule,
localDataSourceModule,
remoteDataSourceModule
)
)
}
initDependencyInjection()
}

override fun attachBaseContext(base: Context?) {
Expand Down Expand Up @@ -276,5 +264,22 @@ class MainApp : MultiDexApplication() {

return isBeta
}

fun initDependencyInjection() {
stopKoin()
startKoin {
androidContext(appContext!!)
modules(
listOf(
commonModule,
viewModelModule,
useCaseModule,
repositoryModule,
localDataSourceModule,
remoteDataSourceModule
)
)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1316,15 +1316,15 @@ class FileDataStorageManager {
}

fun getCapability(accountName: String): OCCapability? {
val capability: OCCapability? = null
val c = getCapabilityCursorForAccount(accountName)
var capability: OCCapability? = null
val cursor = getCapabilityCursorForAccount(accountName)

// default value with all UNKNOWN
if (c != null) {
if (c.moveToFirst()) {
createCapabilityInstance(c)
if (cursor != null) {
if (cursor.moveToFirst()) {
capability = createCapabilityInstance(cursor)
}
c.close()
cursor.close()
}
return capability
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ public class FeatureList {
new FeatureItem(R.drawable.whats_new_video_streaming, R.string.welcome_feature_5_title,
R.string.welcome_feature_5_text, "2.7.0", "0", SHOW_ON_FIRST_RUN),

// Features introduced in 2.11.0
new FeatureItem(R.drawable.whats_new_document_provider, R.string.welcome_feature_9_title,
R.string.welcome_feature_9_text, "2.11.0", "0", SHOW_ON_UPGRADE),
new FeatureItem(R.drawable.whats_new_logs_search, R.string.welcome_feature_10_title,
R.string.welcome_feature_10_text, "2.11.0", "0", SHOW_ON_UPGRADE)
// Features introduced in 2.14.0
new FeatureItem(R.drawable.whats_new_no_more_10, R.string.welcome_feature_11_title,
R.string.welcome_feature_11_text, "2.14.0", "0", SHOW_ON_UPGRADE),
new FeatureItem(R.drawable.whats_new_no_more_4_4, R.string.welcome_feature_12_title,
R.string.welcome_feature_12_text, "2.14.0", "0", SHOW_ON_UPGRADE)
};

static public FeatureItem[] get() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class FileContentProvider(val executors: Executors = Executors()) : ContentProvi
when (uriMatcher.match(uri)) {
SINGLE_FILE -> {
val c = query(uri, null, where, whereArgs, null)
var remoteId = ""
var remoteId : String? = ""
if (c.moveToFirst()) {
remoteId = c.getString(c.getColumnIndex(ProviderTableMeta.FILE_REMOTE_ID))
c.close()
Expand Down Expand Up @@ -310,9 +310,6 @@ class FileContentProvider(val executors: Executors = Executors()) : ContentProvi
sqlQuery.setStrict(true)
sqlQuery.tables = ProviderTableMeta.FILE_TABLE_NAME

// To use full SQL queries within Room
val newDb: SupportSQLiteDatabase = OwncloudDatabase.getDatabase(context).openHelper.writableDatabase

when (uriMatcher.match(uri)) {
ROOT_DIRECTORY -> sqlQuery.setProjectionMap(fileProjectionMap)
DIRECTORY -> {
Expand Down Expand Up @@ -345,6 +342,8 @@ class FileContentProvider(val executors: Executors = Executors()) : ContentProvi
}
).create()

// To use full SQL queries within Room
val newDb: SupportSQLiteDatabase = OwncloudDatabase.getDatabase(context).openHelper.writableDatabase
return newDb.query(supportSqlQuery)
}
CAPABILITIES -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ private void openFeedback() {
private void accountClicked(String accountName) {
if (!AccountUtils.getCurrentOwnCloudAccount(getApplicationContext()).name.equals(accountName)) {
AccountUtils.setCurrentOwnCloudAccount(getApplicationContext(), accountName);
// Refresh dependencies to be used in selected account
MainApp.Companion.initDependencyInjection();
restart();
}
}
Expand Down Expand Up @@ -733,6 +735,8 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// current account has changed
if (data.getBooleanExtra(ManageAccountsActivity.KEY_CURRENT_ACCOUNT_CHANGED, false)) {
setAccount(AccountUtils.getCurrentOwnCloudAccount(this));
// Refresh dependencies to be used in selected account
MainApp.Companion.initDependencyInjection();
restart();
} else {
updateAccountList();
Expand Down Expand Up @@ -761,6 +765,8 @@ protected void onAccountCreationSuccessful(AccountManagerFuture<Bundle> future)
super.onAccountCreationSuccessful(future);
updateAccountList();
updateQuota();
// Refresh dependencies to be used in selected account
MainApp.Companion.initDependencyInjection();
restart();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ private void switchAccount(int position) {
ManageAccountsActivity.this,
clickedAccount.name
);
// Refresh dependencies to be used in selected account
MainApp.Companion.initDependencyInjection();
Intent i = new Intent(
ManageAccountsActivity.this,
FileDisplayActivity.class
Expand All @@ -347,7 +349,6 @@ private void switchAccount(int position) {
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(i);
}

}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,10 @@ public void onBackPressed() {
private void updateNextButtonIfNeeded() {
if (!mProgress.hasNextStep()) {
mForwardFinishButton.setImageResource(R.drawable.ic_done_white);
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
mForwardFinishButton.setBackground(getResources().getDrawable(R.drawable.round_button));
} else {
mForwardFinishButton.setBackgroundDrawable(getResources().getDrawable(R.drawable.round_button));
}
mForwardFinishButton.setBackground(getResources().getDrawable(R.drawable.round_button));
} else {
mForwardFinishButton.setImageResource(R.drawable.ic_arrow_forward);
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
mForwardFinishButton.setBackground(null);
} else {
mForwardFinishButton.setBackgroundDrawable(null);
}
mForwardFinishButton.setBackground(null);
}
}

Expand Down
Binary file modified owncloudApp/src/main/res/drawable-hdpi/drawer_logo.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed owncloudApp/src/main/res/drawable-mdpi/drawer_logo.png
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
22 changes: 11 additions & 11 deletions owncloudApp/src/main/res/layout-h620dp/drawer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,37 @@
app:headerLayout="@layout/drawer_header"
app:menu="@menu/drawer_menu">

<RelativeLayout
<ImageView
android:id="@+id/drawer_logo"
android:layout_width="match_parent"
android:layout_height="140dp"
android:scaleType="centerInside"
android:layout_gravity="bottom"
android:layout_margin="@dimen/standard_margin"
android:paddingBottom="50dp"/>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@color/white"
android:orientation="vertical"
android:padding="@dimen/standard_padding">

<ImageView
android:id="@+id/drawer_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:paddingBottom="@dimen/standard_half_padding" />

<ProgressBar
android:id="@+id/account_quota_bar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/drawer_logo"
android:progress="25"
android:visibility="visible" />

<TextView
android:id="@+id/account_quota_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/account_quota_bar"
android:text="@string/drawer_loading_quota" />
</RelativeLayout>
</LinearLayout>

</com.google.android.material.navigation.NavigationView>

Expand Down
4 changes: 4 additions & 0 deletions owncloudApp/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,10 @@
<string name="welcome_feature_9_text">Access and edit your ownCloud files from other apps</string>
<string name="welcome_feature_10_title">Logs with search for everyone</string>
<string name="welcome_feature_10_text">Send us your logs to make the app work better</string>
<string name="welcome_feature_11_title">End of support for servers lower than 10</string>
<string name="welcome_feature_11_text">Please upgrade your server or the coming app versions will not work for you</string>
<string name="welcome_feature_12_title">End of support for Android 4.4 devices</string>
<string name="welcome_feature_12_text">The coming app versions will not appear in Google Play for devices lower than Android 5</string>
<string name="no_borwser_installed_alert">No browser installed. Please install a Browser in order to allow a secure login.</string>
<string name="common_not_found">it was not found</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ data class OCCapabilityEntity(
val filesSharingPublicPasswordEnforcedUploadOnly: Int,
@ColumnInfo(name = CAPABILITIES_SHARING_PUBLIC_EXPIRE_DATE_ENABLED, defaultValue = capabilityBooleanTypeUnknownString)
val filesSharingPublicExpireDateEnabled: Int,
@ColumnInfo(name = CAPABILITIES_SHARING_PUBLIC_EXPIRE_DATE_DAYS, defaultValue = "0")
@ColumnInfo(name = CAPABILITIES_SHARING_PUBLIC_EXPIRE_DATE_DAYS)
val filesSharingPublicExpireDateDays: Int,
@ColumnInfo(name = CAPABILITIES_SHARING_PUBLIC_EXPIRE_DATE_ENFORCED, defaultValue = capabilityBooleanTypeUnknownString)
val filesSharingPublicExpireDateEnforced: Int,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ class OCShareService(override val client: OwnCloudClient) : ShareService {
remoteFilePath: String,
reshares: Boolean,
subfiles: Boolean
): RemoteOperationResult<ShareParserResult> =
GetRemoteSharesForFileOperation(
remoteFilePath,
reshares,
subfiles
).execute(client)
): RemoteOperationResult<ShareParserResult> = GetRemoteSharesForFileOperation(
remoteFilePath,
reshares,
subfiles
).execute(client)

override fun insertShare(
remoteFilePath: String,
Expand Down