mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 07:05:49 +03:00
Merge pull request #6786 from nextcloud/dependabot/gradle/com.pinterest-ktlint-0.38.0
Bump ktlint from 0.37.2 to 0.38.0
This commit is contained in:
commit
a90cf6a364
8 changed files with 30 additions and 19 deletions
|
@ -333,7 +333,7 @@ dependencies {
|
||||||
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
|
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
|
||||||
kapt "com.google.dagger:dagger-android-processor:$daggerVersion"
|
kapt "com.google.dagger:dagger-android-processor:$daggerVersion"
|
||||||
|
|
||||||
ktlint "com.pinterest:ktlint:0.37.2"
|
ktlint "com.pinterest:ktlint:0.38.0"
|
||||||
implementation 'org.conscrypt:conscrypt-android:2.5.0'
|
implementation 'org.conscrypt:conscrypt-android:2.5.0'
|
||||||
|
|
||||||
// Shimmer animation
|
// Shimmer animation
|
||||||
|
|
|
@ -49,7 +49,8 @@ class ShowErrorActivity : AppCompatActivity() {
|
||||||
|
|
||||||
val snackbar = DisplayUtils.createSnackbar(
|
val snackbar = DisplayUtils.createSnackbar(
|
||||||
error_page_container,
|
error_page_container,
|
||||||
R.string.error_report_issue_text, Snackbar.LENGTH_INDEFINITE
|
R.string.error_report_issue_text,
|
||||||
|
Snackbar.LENGTH_INDEFINITE
|
||||||
)
|
)
|
||||||
.setAction(R.string.error_report_issue_action) { reportIssue() }
|
.setAction(R.string.error_report_issue_action) { reportIssue() }
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,8 @@ class AccountRemovalWork(
|
||||||
)
|
)
|
||||||
pushArbitraryData.isShouldBeDeleted = true
|
pushArbitraryData.isShouldBeDeleted = true
|
||||||
arbitraryDataProvider.storeOrUpdateKeyValue(
|
arbitraryDataProvider.storeOrUpdateKeyValue(
|
||||||
user.accountName, PushUtils.KEY_PUSH,
|
user.accountName,
|
||||||
|
PushUtils.KEY_PUSH,
|
||||||
gson.toJson(pushArbitraryData)
|
gson.toJson(pushArbitraryData)
|
||||||
)
|
)
|
||||||
PushUtils.pushRegistrationToServer(userAccountManager, pushArbitraryData.getPushToken())
|
PushUtils.pushRegistrationToServer(userAccountManager, pushArbitraryData.getPushToken())
|
||||||
|
|
|
@ -124,8 +124,11 @@ class ContactsBackupWork(
|
||||||
private fun backupContact(user: User, backupFolder: String) {
|
private fun backupContact(user: User, backupFolder: String) {
|
||||||
val vCard = ArrayList<String>()
|
val vCard = ArrayList<String>()
|
||||||
val cursor = contentResolver.query(
|
val cursor = contentResolver.query(
|
||||||
ContactsContract.Contacts.CONTENT_URI, null,
|
ContactsContract.Contacts.CONTENT_URI,
|
||||||
null, null, null
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null
|
||||||
)
|
)
|
||||||
if (cursor != null && cursor.count > 0) {
|
if (cursor != null && cursor.count > 0) {
|
||||||
cursor.moveToFirst()
|
cursor.moveToFirst()
|
||||||
|
|
|
@ -117,7 +117,12 @@ class FilesSyncWork(
|
||||||
for (syncedFolder in syncedFolderProvider.syncedFolders) {
|
for (syncedFolder in syncedFolderProvider.syncedFolders) {
|
||||||
if (syncedFolder.isEnabled && (!skipCustom || MediaFolderType.CUSTOM != syncedFolder.type)) {
|
if (syncedFolder.isEnabled && (!skipCustom || MediaFolderType.CUSTOM != syncedFolder.type)) {
|
||||||
syncFolder(
|
syncFolder(
|
||||||
context, resources, lightVersion, filesystemDataProvider, currentLocale, dateFormat,
|
context,
|
||||||
|
resources,
|
||||||
|
lightVersion,
|
||||||
|
filesystemDataProvider,
|
||||||
|
currentLocale,
|
||||||
|
dateFormat,
|
||||||
syncedFolder
|
syncedFolder
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ import com.owncloud.android.datamodel.MediaFoldersModel
|
||||||
import com.owncloud.android.datamodel.MediaProvider
|
import com.owncloud.android.datamodel.MediaProvider
|
||||||
import com.owncloud.android.datamodel.SyncedFolderProvider
|
import com.owncloud.android.datamodel.SyncedFolderProvider
|
||||||
import com.owncloud.android.lib.common.utils.Log_OC
|
import com.owncloud.android.lib.common.utils.Log_OC
|
||||||
import com.owncloud.android.ui.activity.ManageAccountsActivity
|
import com.owncloud.android.ui.activity.ManageAccountsActivity.PENDING_FOR_REMOVAL
|
||||||
import com.owncloud.android.ui.activity.SyncedFoldersActivity
|
import com.owncloud.android.ui.activity.SyncedFoldersActivity
|
||||||
import com.owncloud.android.ui.notifications.NotificationUtils
|
import com.owncloud.android.ui.notifications.NotificationUtils
|
||||||
import com.owncloud.android.utils.ThemeUtils
|
import com.owncloud.android.utils.ThemeUtils
|
||||||
|
@ -123,10 +123,7 @@ class MediaFoldersDetectionWork constructor(
|
||||||
val allUsers = userAccountManager.allUsers
|
val allUsers = userAccountManager.allUsers
|
||||||
val activeUsers: MutableList<User> = ArrayList()
|
val activeUsers: MutableList<User> = ArrayList()
|
||||||
for (account in allUsers) {
|
for (account in allUsers) {
|
||||||
if (!arbitraryDataProvider.getBooleanValue(
|
if (!arbitraryDataProvider.getBooleanValue(account.toPlatformAccount(), PENDING_FOR_REMOVAL)
|
||||||
account.toPlatformAccount(),
|
|
||||||
ManageAccountsActivity.PENDING_FOR_REMOVAL
|
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
activeUsers.add(account)
|
activeUsers.add(account)
|
||||||
}
|
}
|
||||||
|
@ -176,7 +173,8 @@ class MediaFoldersDetectionWork constructor(
|
||||||
} else {
|
} else {
|
||||||
mediaFoldersModel = MediaFoldersModel(imageMediaFolderPaths, videoMediaFolderPaths)
|
mediaFoldersModel = MediaFoldersModel(imageMediaFolderPaths, videoMediaFolderPaths)
|
||||||
arbitraryDataProvider.storeOrUpdateKeyValue(
|
arbitraryDataProvider.storeOrUpdateKeyValue(
|
||||||
ACCOUNT_NAME_GLOBAL, KEY_MEDIA_FOLDERS,
|
ACCOUNT_NAME_GLOBAL,
|
||||||
|
KEY_MEDIA_FOLDERS,
|
||||||
gson.toJson(mediaFoldersModel)
|
gson.toJson(mediaFoldersModel)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -195,7 +193,8 @@ class MediaFoldersDetectionWork constructor(
|
||||||
intent.putExtra(SyncedFoldersActivity.EXTRA_SHOW_SIDEBAR, true)
|
intent.putExtra(SyncedFoldersActivity.EXTRA_SHOW_SIDEBAR, true)
|
||||||
val pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_ONE_SHOT)
|
val pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_ONE_SHOT)
|
||||||
val notificationBuilder = NotificationCompat.Builder(
|
val notificationBuilder = NotificationCompat.Builder(
|
||||||
context, NotificationUtils.NOTIFICATION_CHANNEL_GENERAL
|
context,
|
||||||
|
NotificationUtils.NOTIFICATION_CHANNEL_GENERAL
|
||||||
)
|
)
|
||||||
.setSmallIcon(R.drawable.notification_icon)
|
.setSmallIcon(R.drawable.notification_icon)
|
||||||
.setLargeIcon(BitmapFactory.decodeResource(context.resources, R.drawable.notification_icon))
|
.setLargeIcon(BitmapFactory.decodeResource(context.resources, R.drawable.notification_icon))
|
||||||
|
|
|
@ -179,13 +179,16 @@ class NotificationWork constructor(
|
||||||
disableDetection.putExtra(PUSH_NOTIFICATION_ID, pushNotificationId)
|
disableDetection.putExtra(PUSH_NOTIFICATION_ID, pushNotificationId)
|
||||||
disableDetection.putExtra(KEY_NOTIFICATION_ACCOUNT, user.accountName)
|
disableDetection.putExtra(KEY_NOTIFICATION_ACCOUNT, user.accountName)
|
||||||
val disableIntent = PendingIntent.getBroadcast(
|
val disableIntent = PendingIntent.getBroadcast(
|
||||||
context, pushNotificationId, disableDetection,
|
context,
|
||||||
|
pushNotificationId,
|
||||||
|
disableDetection,
|
||||||
PendingIntent.FLAG_CANCEL_CURRENT
|
PendingIntent.FLAG_CANCEL_CURRENT
|
||||||
)
|
)
|
||||||
notificationBuilder.addAction(
|
notificationBuilder.addAction(
|
||||||
NotificationCompat.Action(
|
NotificationCompat.Action(
|
||||||
R.drawable.ic_close,
|
R.drawable.ic_close,
|
||||||
context.getString(R.string.remove_push_notification), disableIntent
|
context.getString(R.string.remove_push_notification),
|
||||||
|
disableIntent
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
} else { // Actions
|
} else { // Actions
|
||||||
|
@ -197,7 +200,8 @@ class NotificationWork constructor(
|
||||||
actionIntent.putExtra(KEY_NOTIFICATION_ACTION_LINK, action.link)
|
actionIntent.putExtra(KEY_NOTIFICATION_ACTION_LINK, action.link)
|
||||||
actionIntent.putExtra(KEY_NOTIFICATION_ACTION_TYPE, action.type)
|
actionIntent.putExtra(KEY_NOTIFICATION_ACTION_TYPE, action.type)
|
||||||
val actionPendingIntent = PendingIntent.getBroadcast(
|
val actionPendingIntent = PendingIntent.getBroadcast(
|
||||||
context, randomId.nextInt(),
|
context,
|
||||||
|
randomId.nextInt(),
|
||||||
actionIntent,
|
actionIntent,
|
||||||
PendingIntent.FLAG_CANCEL_CURRENT
|
PendingIntent.FLAG_CANCEL_CURRENT
|
||||||
)
|
)
|
||||||
|
|
|
@ -58,9 +58,7 @@ class TextEditorWebView : EditorWebView() {
|
||||||
|
|
||||||
webview.addJavascriptInterface(MobileInterface(), "DirectEditingMobileInterface")
|
webview.addJavascriptInterface(MobileInterface(), "DirectEditingMobileInterface")
|
||||||
|
|
||||||
webview.setDownloadListener({ url, userAgent, contentDisposition, mimetype, contentLength ->
|
webview.setDownloadListener { url, _, _, _, _ -> downloadFile(Uri.parse(url)) }
|
||||||
downloadFile(Uri.parse(url))
|
|
||||||
})
|
|
||||||
|
|
||||||
loadUrl(intent.getStringExtra(ExternalSiteWebView.EXTRA_URL))
|
loadUrl(intent.getStringExtra(ExternalSiteWebView.EXTRA_URL))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue