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:
Tobias Kaminsky 2020-08-24 10:09:55 +02:00 committed by GitHub
commit a90cf6a364
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 30 additions and 19 deletions

View file

@ -333,7 +333,7 @@ dependencies {
kapt "com.google.dagger:dagger-compiler:$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'
// Shimmer animation

View file

@ -49,7 +49,8 @@ class ShowErrorActivity : AppCompatActivity() {
val snackbar = DisplayUtils.createSnackbar(
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() }

View file

@ -150,7 +150,8 @@ class AccountRemovalWork(
)
pushArbitraryData.isShouldBeDeleted = true
arbitraryDataProvider.storeOrUpdateKeyValue(
user.accountName, PushUtils.KEY_PUSH,
user.accountName,
PushUtils.KEY_PUSH,
gson.toJson(pushArbitraryData)
)
PushUtils.pushRegistrationToServer(userAccountManager, pushArbitraryData.getPushToken())

View file

@ -124,8 +124,11 @@ class ContactsBackupWork(
private fun backupContact(user: User, backupFolder: String) {
val vCard = ArrayList<String>()
val cursor = contentResolver.query(
ContactsContract.Contacts.CONTENT_URI, null,
null, null, null
ContactsContract.Contacts.CONTENT_URI,
null,
null,
null,
null
)
if (cursor != null && cursor.count > 0) {
cursor.moveToFirst()

View file

@ -117,7 +117,12 @@ class FilesSyncWork(
for (syncedFolder in syncedFolderProvider.syncedFolders) {
if (syncedFolder.isEnabled && (!skipCustom || MediaFolderType.CUSTOM != syncedFolder.type)) {
syncFolder(
context, resources, lightVersion, filesystemDataProvider, currentLocale, dateFormat,
context,
resources,
lightVersion,
filesystemDataProvider,
currentLocale,
dateFormat,
syncedFolder
)
}

View file

@ -49,7 +49,7 @@ import com.owncloud.android.datamodel.MediaFoldersModel
import com.owncloud.android.datamodel.MediaProvider
import com.owncloud.android.datamodel.SyncedFolderProvider
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.notifications.NotificationUtils
import com.owncloud.android.utils.ThemeUtils
@ -123,10 +123,7 @@ class MediaFoldersDetectionWork constructor(
val allUsers = userAccountManager.allUsers
val activeUsers: MutableList<User> = ArrayList()
for (account in allUsers) {
if (!arbitraryDataProvider.getBooleanValue(
account.toPlatformAccount(),
ManageAccountsActivity.PENDING_FOR_REMOVAL
)
if (!arbitraryDataProvider.getBooleanValue(account.toPlatformAccount(), PENDING_FOR_REMOVAL)
) {
activeUsers.add(account)
}
@ -176,7 +173,8 @@ class MediaFoldersDetectionWork constructor(
} else {
mediaFoldersModel = MediaFoldersModel(imageMediaFolderPaths, videoMediaFolderPaths)
arbitraryDataProvider.storeOrUpdateKeyValue(
ACCOUNT_NAME_GLOBAL, KEY_MEDIA_FOLDERS,
ACCOUNT_NAME_GLOBAL,
KEY_MEDIA_FOLDERS,
gson.toJson(mediaFoldersModel)
)
}
@ -195,7 +193,8 @@ class MediaFoldersDetectionWork constructor(
intent.putExtra(SyncedFoldersActivity.EXTRA_SHOW_SIDEBAR, true)
val pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_ONE_SHOT)
val notificationBuilder = NotificationCompat.Builder(
context, NotificationUtils.NOTIFICATION_CHANNEL_GENERAL
context,
NotificationUtils.NOTIFICATION_CHANNEL_GENERAL
)
.setSmallIcon(R.drawable.notification_icon)
.setLargeIcon(BitmapFactory.decodeResource(context.resources, R.drawable.notification_icon))

View file

@ -179,13 +179,16 @@ class NotificationWork constructor(
disableDetection.putExtra(PUSH_NOTIFICATION_ID, pushNotificationId)
disableDetection.putExtra(KEY_NOTIFICATION_ACCOUNT, user.accountName)
val disableIntent = PendingIntent.getBroadcast(
context, pushNotificationId, disableDetection,
context,
pushNotificationId,
disableDetection,
PendingIntent.FLAG_CANCEL_CURRENT
)
notificationBuilder.addAction(
NotificationCompat.Action(
R.drawable.ic_close,
context.getString(R.string.remove_push_notification), disableIntent
context.getString(R.string.remove_push_notification),
disableIntent
)
)
} else { // Actions
@ -197,7 +200,8 @@ class NotificationWork constructor(
actionIntent.putExtra(KEY_NOTIFICATION_ACTION_LINK, action.link)
actionIntent.putExtra(KEY_NOTIFICATION_ACTION_TYPE, action.type)
val actionPendingIntent = PendingIntent.getBroadcast(
context, randomId.nextInt(),
context,
randomId.nextInt(),
actionIntent,
PendingIntent.FLAG_CANCEL_CURRENT
)

View file

@ -58,9 +58,7 @@ class TextEditorWebView : EditorWebView() {
webview.addJavascriptInterface(MobileInterface(), "DirectEditingMobileInterface")
webview.setDownloadListener({ url, userAgent, contentDisposition, mimetype, contentLength ->
downloadFile(Uri.parse(url))
})
webview.setDownloadListener { url, _, _, _, _ -> downloadFile(Uri.parse(url)) }
loadUrl(intent.getStringExtra(ExternalSiteWebView.EXTRA_URL))
}