Overview
| Correctness | |
| 5 | warning EmptySuperCall: Calling an empty super method |
| 1 | warning CheckResult: Ignoring results |
| 12 | error NewApi: Calling new methods on older versions |
| 1 | warning OldTargetApi: Target SDK attribute is not targeting latest version |
| 13 | warning
SdCardPath: Hardcoded reference to /sdcard |
| 5 | error WrongConstant: Incorrect constant |
| 1 | warning PictureInPictureIssue: Picture In Picture best practices not followed |
| 2 | warning SelectedPhotoAccess: Behavior change when requesting photo library access |
| 1 | warning ConfigurationScreenWidthHeight: Using Configuration.screenWidthDp/screenHeightDp instead of LocalWindowInfo.current.containerSize |
| 2 | warning LocalContextResourcesRead: Reading Resources using LocalContext.current.resources is not configuration-aware and may return stale values if the Configuration changes |
| 1 | error StateFlowValueCalledInComposition: StateFlow.value should not be called within composition |
| Security | |
| 1 | warning AcceptsUserCertificates: Allowing User Certificates |
| 1 | warning CustomX509TrustManager: Implements custom TLS trust manager |
| 2 | warning ExportedService: Exported service does not require permission |
| 1 | warning InsecureBaseConfiguration: Insecure Base Configuration |
| 1 | warning DataExtractionRules: Missing data extraction rules |
| Performance | |
| 4 | warning NotifyDataSetChanged: Invalidating All RecyclerView Data |
| 1 | warning ObsoleteSdkInt: Obsolete SDK_INT Version Check |
| 2 | warning StaticFieldLeak: Static Field Leaks |
| 1 | warning ViewHolder: View Holder Candidates |
| 7 | warning
AutoboxingStateCreation: State<T> will autobox values assigned to this state. Use a specialized state type instead. |
| 1 | warning
DisableBaselineAlignment: Missing baselineAligned attribute |
| 1 | warning Overdraw: Overdraw: Painting regions more than once |
| 89 | warning UnusedResources: Unused resources |
| 1 | warning UselessParent: Unnecessary parent layout |
| 1 | warning TooManyViews: Layout has too many views |
| Productivity | |
| 4 | warning UseKtx: Use KTX extension function |
| Accessibility | |
| 1 | warning ClickableViewAccessibility: Accessibility in Custom Views |
| Included Additional Checks (104) | |
| Disabled Checks (48) |
Calling an empty super method
../../src/main/java/com/nextcloud/talk/viewmodels/CallRecordingViewModel.kt:116:
113 } 114 115 override fun onCleared() { 116 super.onCleared() 117 disposable?.dispose() 118 }../../src/main/java/com/nextcloud/talk/polls/viewmodels/PollCreateViewModel.kt:77:
74 } 75 76 override fun onCleared() { 77 super.onCleared() 78 disposable?.dispose() 79 }../../src/main/java/com/nextcloud/talk/polls/viewmodels/PollMainViewModel.kt:134:
131 } 132 133 override fun onCleared() { 134 super.onCleared() 135 disposable?.dispose() 136 }../../src/main/java/com/nextcloud/talk/polls/viewmodels/PollResultsViewModel.kt:39:
36 private var disposable: Disposable? = null 37 38 override fun onCleared() { 39 super.onCleared() 40 disposable?.dispose() 41 }../../src/main/java/com/nextcloud/talk/polls/viewmodels/PollVoteViewModel.kt:98:
95 } 96 97 override fun onCleared() { 98 super.onCleared() 99 disposable?.dispose() 100 }
EmptySuperCall
Correctness
Warning
Priority 9/10
Ignoring results
../../src/main/java/com/nextcloud/talk/activities/CallActivity.kt:2312:
2309 2310 // Fire DELETE best-effort; do not block the UI waiting for the server response. 2311 // The subscription runs entirely on the IO thread — no observeOn(mainThread) needed. 2312 ncApi!!.leaveCall(credentials, ApiUtils.getUrlForCall(apiVersion, baseUrl, roomToken!!), endCall) 2313 .subscribeOn(Schedulers.io()) 2314 .subscribe( 2315 { /* successfully left call */ },
CheckResult
Correctness
Warning
Priority 6/10
Calling new methods on older versions
../../src/main/java/com/nextcloud/talk/activities/CallActivity.kt:2357:
2354 val taskInfo = appTask.taskInfo 2355 val baseActivityName = taskInfo?.baseActivity?.className 2356 taskInfo != null && 2357 taskInfo.taskId != taskId && 2358 baseActivityName == MainActivity::class.java.name 2359 } ?: appTasks.firstOrNull { appTask -> 2360 val taskInfo = appTask.taskInfo../../src/main/java/com/nextcloud/talk/activities/CallActivity.kt:2363:
2360 val taskInfo = appTask.taskInfo 2361 val baseActivityName = taskInfo?.baseActivity?.className 2362 taskInfo != null && 2363 taskInfo.taskId != taskId && 2364 baseActivityName != CallActivity::class.java.name && 2365 baseActivityName != CallNotificationActivity::class.java.name 2366 }../../src/main/java/com/nextcloud/talk/activities/CallActivity.kt:2374:
2371 } 2372 primaryTask.startActivity(context, intent, null) 2373 primaryTask.moveToFront() 2374 val primaryTaskId = primaryTask.taskInfo?.taskId 2375 appTasks 2376 .filter { appTask -> 2377 val taskInfo = appTask.taskInfo../../src/main/java/com/nextcloud/talk/activities/CallActivity.kt:2381:
2378 val baseActivityName = taskInfo?.baseActivity?.className 2379 val isCallTask = baseActivityName == CallActivity::class.java.name || 2380 baseActivityName == CallNotificationActivity::class.java.name 2381 taskInfo != null && !isCallTask && taskInfo.taskId != primaryTaskId && taskInfo.taskId != taskId 2382 } 2383 .forEach { it.finishAndRemoveTask() } 2384 } else {../../src/main/java/com/nextcloud/talk/activities/CallActivity.kt:2381:
2378 val baseActivityName = taskInfo?.baseActivity?.className 2379 val isCallTask = baseActivityName == CallActivity::class.java.name || 2380 baseActivityName == CallNotificationActivity::class.java.name 2381 taskInfo != null && !isCallTask && taskInfo.taskId != primaryTaskId && taskInfo.taskId != taskId 2382 } 2383 .forEach { it.finishAndRemoveTask() } 2384 } else {+ 7 More Occurrences...
NewApi
Correctness
Error
Priority 6/10
Target SDK attribute is not targeting latest version
../../build.gradle.kts:59:
56 providers.gradleProperty("NC_TEST_SERVER_PASSWORD").getOrElse("") 57 58 minSdk = 26 59 targetSdk = 36 60 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 61 62 // mayor.minor.hotfix.increment (for increment: 01-50=Alpha / 51-89=RC / 90-99=stable)
OldTargetApi
Correctness
Warning
Priority 6/10
Hardcoded reference to /sdcard
../../src/main/java/com/nextcloud/talk/attachmentpreview/FileAttachmentPreviewScreen.kt:379:
376 FileAttachmentPreviewContent( 377 viewModel = rememberPreviewViewModel( 378 listOf( 379 "file:///sdcard/DCIM/photo.jpg", 380 "file:///sdcard/DCIM/video.mp4", 381 "file:///sdcard/Documents/report.pdf", 382 "file:///sdcard/DCIM/photo2.jpg"../../src/main/java/com/nextcloud/talk/attachmentpreview/FileAttachmentPreviewScreen.kt:380:
377 viewModel = rememberPreviewViewModel( 378 listOf( 379 "file:///sdcard/DCIM/photo.jpg", 380 "file:///sdcard/DCIM/video.mp4", 381 "file:///sdcard/Documents/report.pdf", 382 "file:///sdcard/DCIM/photo2.jpg" 383 )../../src/main/java/com/nextcloud/talk/attachmentpreview/FileAttachmentPreviewScreen.kt:381:
378 listOf( 379 "file:///sdcard/DCIM/photo.jpg", 380 "file:///sdcard/DCIM/video.mp4", 381 "file:///sdcard/Documents/report.pdf", 382 "file:///sdcard/DCIM/photo2.jpg" 383 ) 384 ),../../src/main/java/com/nextcloud/talk/attachmentpreview/FileAttachmentPreviewScreen.kt:382:
379 "file:///sdcard/DCIM/photo.jpg", 380 "file:///sdcard/DCIM/video.mp4", 381 "file:///sdcard/Documents/report.pdf", 382 "file:///sdcard/DCIM/photo2.jpg" 383 ) 384 ), 385 conversationName = "Team Chat",../../src/main/java/com/nextcloud/talk/attachmentpreview/FileAttachmentPreviewScreen.kt:398:
395 private fun FileAttachmentPreviewContentSingleFilePreview() { 396 MaterialTheme(colorScheme = lightColorScheme()) { 397 FileAttachmentPreviewContent( 398 viewModel = rememberPreviewViewModel(listOf("file:///sdcard/DCIM/photo.jpg")), 399 conversationName = "Team Chat", 400 initialCompressImages = true, 401 onDismiss = {},+ 8 More Occurrences...
SdCardPath
Correctness
Warning
Priority 6/10
Incorrect constant
../../src/main/java/com/nextcloud/talk/activities/BaseActivity.kt:191:
188 decorView.setOnApplyWindowInsetsListener { view, insets -> 189 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) { 190 val systemBars = insets.getInsets( 191 WindowInsetsCompat.Type.systemBars() or 192 WindowInsetsCompat.Type.displayCutout() 193 ) 194 val color = ResourcesCompat.getColor(resources, R.color.bg_default, context.theme)../../src/main/java/com/nextcloud/talk/activities/BaseActivity.kt:192:
189 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) { 190 val systemBars = insets.getInsets( 191 WindowInsetsCompat.Type.systemBars() or 192 WindowInsetsCompat.Type.displayCutout() 193 ) 194 val color = ResourcesCompat.getColor(resources, R.color.bg_default, context.theme) 195 view.setBackgroundColor(color)../../src/main/java/com/nextcloud/talk/services/CallForegroundService.kt:179:
176 .setContentIntent(pendingIntent) 177 .setOngoing(true) 178 .setCategory(Notification.CATEGORY_CALL) 179 .setForegroundServiceBehavior(FOREGROUND_SERVICE_IMMEDIATE) 180 .setShowWhen(false) 181 .setOnlyAlertOnce(true) 182 .also { builder ->../../src/main/java/com/nextcloud/talk/remotefilebrowser/activities/RemoteFileBrowserActivity.kt:254:
251 decorView.setOnApplyWindowInsetsListener { view, insets -> 252 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) { 253 val systemBars = insets.getInsets( 254 WindowInsetsCompat.Type.systemBars() or 255 WindowInsetsCompat.Type.displayCutout() 256 ) 257 view.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)../../src/main/java/com/nextcloud/talk/remotefilebrowser/activities/RemoteFileBrowserActivity.kt:255:
252 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) { 253 val systemBars = insets.getInsets( 254 WindowInsetsCompat.Type.systemBars() or 255 WindowInsetsCompat.Type.displayCutout() 256 ) 257 view.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom) 258 }
WrongConstant
Correctness
Error
Priority 6/10
Picture In Picture best practices not followed
../../src/main/AndroidManifest.xml:86:
83 android:protectionLevel="signature" /> 84 <uses-permission android:name="${applicationId}.${broadcastPermission}" /> 85 86 <application 87 android:name=".application.NextcloudTalkApplication" 88 android:allowBackup="true" 89 android:fullBackupContent="@xml/backup_config"
PictureInPictureIssue
Correctness
Warning
Priority 5/10
Behavior change when requesting photo library access
../../src/main/AndroidManifest.xml:66:
63 <uses-permission 64 android:name="android.permission.READ_EXTERNAL_STORAGE" 65 android:maxSdkVersion="32" /> 66 <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" /> 67 <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" /> 68 <uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />../../src/main/AndroidManifest.xml:67:
64 android:name="android.permission.READ_EXTERNAL_STORAGE" 65 android:maxSdkVersion="32" /> 66 <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" /> 67 <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" /> 68 <uses-permission android:name="android.permission.READ_MEDIA_AUDIO" /> 69 70 <uses-permission android:name="android.permission.WAKE_LOCK" />
SelectedPhotoAccess
Correctness
Warning
Priority 5/10
Using Configuration.screenWidthDp/screenHeightDp instead of LocalWindowInfo.current.containerSize
../../src/main/java/com/nextcloud/talk/ui/chat/MediaMessage.kt:131:
128 private const val MAX_HEIGHT_FRACTION = 0.4f 129 130 @Composable 131 private fun screenMediaMaxHeight(): Dp = LocalConfiguration.current.screenHeightDp.dp * MAX_HEIGHT_FRACTION 132 133 private val minMediaPreviewHeight = 48.dp 134 private val minMediaPreviewWidth = 88.dp
Vendor: Jetpack Compose
Identifier: androidx.compose.ui
Feedback: https://issuetracker.google.com/issues/new?component=612128
Identifier: androidx.compose.ui
Feedback: https://issuetracker.google.com/issues/new?component=612128
ConfigurationScreenWidthHeight
Correctness
Warning
Priority 3/10
Reading Resources using LocalContext.current.resources is not configuration-aware and may return stale values if the Configuration changes
../../src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationActivity.kt:553:
550 onClick = { 551 copyPasswordToClipboard( 552 context = context, 553 label = context.resources.getString(R.string.nc_app_product_name), 554 password = conversationCreationViewModel.password.value 555 ) 556 }../../src/main/java/com/nextcloud/talk/mediaviewer/activities/MediaViewerScreen.kt:360:
357 var drawable by remember(localPath) { mutableStateOf<Drawable?>(null) } 358 359 LaunchedEffect(localPath) { 360 val displayMetrics = context.resources.displayMetrics 361 val request = ImageRequest.Builder(context) 362 .data(File(localPath)) 363 .size(displayMetrics.widthPixels * 2, displayMetrics.heightPixels * 2)
Vendor: Jetpack Compose
Identifier: androidx.compose.ui
Feedback: https://issuetracker.google.com/issues/new?component=612128
Identifier: androidx.compose.ui
Feedback: https://issuetracker.google.com/issues/new?component=612128
LocalContextResourcesRead
Correctness
Warning
Priority 3/10
StateFlow.value should not be called within composition
../../src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationActivity.kt:435:
432 } 433 participants.toSet().forEach { participant -> 434 Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) { 435 val avatarUser = conversationCreationViewModel.currentUser.value 436 val imageUri = if (avatarUser == null) { 437 null 438 } else {
Vendor: Jetpack Compose
Identifier: androidx.compose.runtime
Feedback: https://issuetracker.google.com/issues/new?component=612128
Identifier: androidx.compose.runtime
Feedback: https://issuetracker.google.com/issues/new?component=612128
StateFlowValueCalledInComposition
Correctness
Error
Priority 3/10
Allowing User Certificates
../../src/main/res/xml/network_security_config.xml:14:
11 <trust-anchors> 12 <certificates src="system"/> 13 <!-- We allow user-certificates so managed device can make use of self-signed/client certificates --> 14 <certificates src="user"/> 15 </trust-anchors> 16 </base-config> 17 </network-security-config>
AcceptsUserCertificates
Security
Warning
Priority 5/10
Implements custom TLS trust manager
../../src/main/java/com/nextcloud/talk/utils/ssl/TrustManager.java:35:
32 import javax.net.ssl.X509TrustManager; 33 34 35 public class TrustManager implements X509TrustManager { 36 private static final String TAG = "TrustManager"; 37 38 private final File keystoreFile;
CustomX509TrustManager
Security
Warning
Priority 5/10
Exported service does not require permission
../../src/main/AndroidManifest.xml:335:
332 android:name=".receivers.EndCallReceiver" 333 android:exported="false" /> 334 335 <service 336 android:name=".utils.SyncService" 337 android:exported="true"> 338 <intent-filter>../../src/main/AndroidManifest.xml:350:
347 android:resource="@xml/contacts" /> 348 </service> 349 350 <service 351 android:name=".chat.data.io.VoiceMessageMediaService" 352 android:foregroundServiceType="mediaPlayback" 353 android:exported="true">
ExportedService
Security
Warning
Priority 5/10
Insecure Base Configuration
../../src/main/res/xml/network_security_config.xml:10:
7 --> 8 <network-security-config> 9 <!-- Allowing cleartextTrafficPermitted - we don't control the server yet strongly suggesting TLS/SSL --> 10 <base-config cleartextTrafficPermitted="true"> 11 <trust-anchors> 12 <certificates src="system"/> 13 <!-- We allow user-certificates so managed device can make use of self-signed/client certificates -->
InsecureBaseConfiguration
Security
Warning
Priority 5/10
Missing data extraction rules
../../src/main/AndroidManifest.xml:89:
86 <application 87 android:name=".application.NextcloudTalkApplication" 88 android:allowBackup="true" 89 android:fullBackupContent="@xml/backup_config" 90 android:icon="@mipmap/ic_launcher" 91 android:label="@string/nc_app_name" 92 android:largeHeap="true"
DataExtractionRules
Security
Warning
Priority 3/10
Invalidating All RecyclerView Data
../../src/main/java/com/nextcloud/talk/bottomsheet/items/ListIconDialogAdapter.kt:110:
107 if (listener != null) { 108 this.selection = listener 109 } 110 this.notifyDataSetChanged() 111 } 112 113 override fun disableItems(indices: IntArray) {../../src/main/java/com/nextcloud/talk/bottomsheet/items/ListIconDialogAdapter.kt:115:
112 113 override fun disableItems(indices: IntArray) { 114 this.disabledIndices = indices 115 notifyDataSetChanged() 116 } 117 118 override fun checkItems(indices: IntArray) = Unit../../src/main/java/com/nextcloud/talk/conversationinfo/ParticipantItemAdapter.kt:53:
50 var filterQuery: String? = null 51 set(value) { 52 field = value 53 notifyDataSetChanged() 54 } 55 56 inner class ViewHolder(val binding: RvItemConversationInfoParticipantBinding) :../../src/main/java/com/nextcloud/talk/polls/adapters/PollCreateOptionsAdapter.kt:43:
40 41 fun updateOptionsList(optionsList: ArrayList<PollCreateOptionItem>) { 42 list = optionsList 43 notifyDataSetChanged() 44 } 45 }
NotifyDataSetChanged
Performance
Warning
Priority 8/10
Obsolete SDK_INT Version Check
ObsoleteSdkInt
Performance
Warning
Priority 6/10
Static Field Leaks
../../src/main/java/com/nextcloud/talk/attachmentpreview/FileAttachmentPreviewViewModel.kt:24:
21 * dialog's original arguments. Everything else on the screen — caption text, drag/scroll 22 * position, HQ toggle animation state — is ephemeral UI state and stays in Compose's `remember`. 23 */ 24 internal class FileAttachmentPreviewViewModel @Inject constructor(private val context: Context) : ViewModel() { 25 26 val files = mutableStateListOf<String>()../../src/main/java/com/nextcloud/talk/logger/ui/LogsViewModel.kt:21:
18 import androidx.core.content.edit 19 import com.nextcloud.talk.logger.Logger 20 21 class LogsViewModel @Inject constructor(private val logsRepository: LogsRepository, private val context: Context) : 22 ViewModel() { 23 24 @Inject
StaticFieldLeak
Performance
Warning
Priority 6/10
View Holder Candidates
../../src/main/java/com/nextcloud/talk/ui/dialog/DialogBanListFragment.kt:63:
60 override fun getItemId(position: Int): Long = bans[position].bannedTime!!.toLong() 61 62 override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View { 63 val binding = BanItemListBinding.inflate(LayoutInflater.from(context)) 64 binding.banActorName.text = bans[position].bannedDisplayName 65 val time = bans[position].bannedTime!!.toLong() * ONE_SEC 66 binding.banTime.text = DateUtils.formatDateTime(
ViewHolder
Performance
Warning
Priority 5/10
State<T> will autobox values assigned to this state. Use a specialized state type instead.
../../src/main/java/com/nextcloud/talk/components/EmojiColorPickers.kt:102:
99 android.graphics.Color.colorToHSV(initialColor ?: paletteColors.first(), hsv) 100 hsv 101 } 102 var hue by rememberSaveable { mutableStateOf(initialHsv[0]) } 103 var saturation by rememberSaveable { mutableStateOf(initialHsv[1]) } 104 var value by rememberSaveable { mutableStateOf(initialHsv[2].coerceAtLeast(MIN_VALUE)) } 105 val sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true)../../src/main/java/com/nextcloud/talk/components/EmojiColorPickers.kt:103:
100 hsv 101 } 102 var hue by rememberSaveable { mutableStateOf(initialHsv[0]) } 103 var saturation by rememberSaveable { mutableStateOf(initialHsv[1]) } 104 var value by rememberSaveable { mutableStateOf(initialHsv[2].coerceAtLeast(MIN_VALUE)) } 105 val sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true) 106 val isLandscape = LocalConfiguration.current.orientation == Configuration.ORIENTATION_LANDSCAPE../../src/main/java/com/nextcloud/talk/components/EmojiColorPickers.kt:104:
101 } 102 var hue by rememberSaveable { mutableStateOf(initialHsv[0]) } 103 var saturation by rememberSaveable { mutableStateOf(initialHsv[1]) } 104 var value by rememberSaveable { mutableStateOf(initialHsv[2].coerceAtLeast(MIN_VALUE)) } 105 val sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true) 106 val isLandscape = LocalConfiguration.current.orientation == Configuration.ORIENTATION_LANDSCAPE../../src/main/java/com/nextcloud/talk/components/EmojiColorPickers.kt:464:
461 val hueColors = remember { hueGradientColors() } 462 val density = LocalDensity.current 463 val thumbRadiusPx = with(density) { (thumbSize / 2).toPx() } 464 var sliderWidth by remember { mutableStateOf(0) } 465 466 Box( 467 modifier = modifier../../src/main/java/com/nextcloud/talk/attachmentpreview/ThumbnailStrip.kt:145:
142 * so the drop-line can be drawn after the last thumbnail, not just before it. 143 */ 144 private class DragReorderState { 145 val draggedIndex = mutableStateOf(-1) 146 val dragOffsetX = mutableStateOf(0f) 147 val insertionIndex = mutableStateOf(-1) 148 }../../src/main/java/com/nextcloud/talk/attachmentpreview/ThumbnailStrip.kt:146:
143 */ 144 private class DragReorderState { 145 val draggedIndex = mutableStateOf(-1) 146 val dragOffsetX = mutableStateOf(0f) 147 val insertionIndex = mutableStateOf(-1) 148 }../../src/main/java/com/nextcloud/talk/attachmentpreview/ThumbnailStrip.kt:147:
144 private class DragReorderState { 145 val draggedIndex = mutableStateOf(-1) 146 val dragOffsetX = mutableStateOf(0f) 147 val insertionIndex = mutableStateOf(-1) 148 } 149 150 @Suppress("LongParameterList")
Vendor: Jetpack Compose
Identifier: androidx.compose.runtime
Feedback: https://issuetracker.google.com/issues/new?component=612128
Identifier: androidx.compose.runtime
Feedback: https://issuetracker.google.com/issues/new?component=612128
AutoboxingStateCreation
Performance
Hint
Priority 3/10
Missing baselineAligned attribute
../../src/main/res/layout/activity_settings.xml:278:
275 android:clickable="false"/> 276 </LinearLayout> 277 278 <LinearLayout 279 android:id="@+id/settings_unifiedpush_service" 280 android:layout_width="match_parent" 281 android:layout_height="wrap_content"
DisableBaselineAlignment
Performance
Warning
Priority 3/10
Overdraw: Painting regions more than once
../../src/main/res/layout/activity_account_verification.xml:12:
9 xmlns:tools="http://schemas.android.com/tools" 10 android:layout_width="match_parent" 11 android:layout_height="match_parent" 12 android:background="@color/bg_default" 13 android:keepScreenOn="true"> 14 15 <ProgressBar
Overdraw
Performance
Warning
Priority 3/10
Unused resources
../../src/main/res/drawable/all_inclusive_24px.xml:7:
4 ~ SPDX-FileCopyrightText: 2025 Google LLC 5 ~ SPDX-License-Identifier: Apache-2.0 6 --> 7 <vector xmlns:android="http://schemas.android.com/apk/res/android" 8 android:width="24dp" 9 android:height="24dp" 10 android:viewportWidth="960"../../src/main/res/drawable/baseline_calendar_month_24.xml:7:
4 ~ SPDX-FileCopyrightText: 2018-2024 Google LLC 5 ~ SPDX-License-Identifier: Apache-2.0 6 --> 7 <vector xmlns:android="http://schemas.android.com/apk/res/android" 8 android:width="24dp" 9 android:height="24dp" 10 android:tint="#000000"../../src/main/res/drawable/baseline_report_problem_24.xml:7:
4 ~ SPDX-FileCopyrightText: 2021-2025 Google LLC 5 ~ SPDX-License-Identifier: Apache-2.0 6 --> 7 <vector xmlns:android="http://schemas.android.com/apk/res/android" 8 android:width="24dp" 9 android:height="24dp" 10 android:tint="#000000"../../src/main/res/drawable/baseline_tag_faces_24.xml:7:
4 ~ SPDX-FileCopyrightText: 2023-2024 Google LLC 5 ~ SPDX-License-Identifier: Apache-2.0 6 --> 7 <vector xmlns:android="http://schemas.android.com/apk/res/android" 8 android:height="24dp" 9 android:tint="#000000" 10 android:viewportHeight="24"../../src/main/res/values/bool.xml:10:
7 --> 8 <resources> 9 <bool name="value_true">true</bool> 10 <bool name="value_false">false</bool> 11 </resources>+ 84 More Occurrences...
UnusedResources
Performance
Warning
Priority 3/10
Unnecessary parent layout
../../src/main/res/layout/activity_settings.xml:286:
283 android:padding="@dimen/standard_padding" 284 android:background="?android:attr/selectableItemBackground"> 285 286 <LinearLayout 287 android:layout_width="0dp" 288 android:layout_height="wrap_content" 289 android:layout_weight="1"
UselessParent
Performance
Warning
Priority 2/10
Layout has too many views
../../src/main/res/layout/activity_settings.xml:621:
618 android:gravity="center_vertical" /> 619 </LinearLayout> 620 621 <LinearLayout 622 android:id="@+id/settings_incognito_keyboard" 623 android:layout_width="match_parent" 624 android:layout_height="wrap_content"
TooManyViews
Performance
Warning
Priority 1/10
Use KTX extension function
../../src/main/java/com/nextcloud/talk/attachmentpreview/FileDescriber.kt:155:
152 val scale = VIDEO_FRAME_MAX_DIMENSION_PX.toFloat() / largestDimension 153 val targetWidth = (bitmap.width * scale).roundToInt().coerceAtLeast(1) 154 val targetHeight = (bitmap.height * scale).roundToInt().coerceAtLeast(1) 155 return Bitmap.createScaledBitmap(bitmap, targetWidth, targetHeight, true) 156 } 157 158 @Suppress("ReturnCount")../../src/main/java/com/nextcloud/talk/chat/ui/MessageActionsBottomSheet.kt:104:
101 102 override fun recordSelection(emoji: String) { 103 val updated = listOf(emoji) + getStoredList().filterNot { it == emoji } 104 prefs.edit() 105 .putString(RECENT_REACTIONS_KEY, updated.take(MAX_STORED_RECENT_REACTIONS).joinToString(",")) 106 .apply() 107 }../../src/main/java/com/nextcloud/talk/chat/MessageInputFragment.kt:921:
918 919 override fun recordSelection(emoji: String) { 920 val updated = listOf(emoji) + getStoredList().filterNot { it == emoji } 921 prefs.edit() 922 .putString("recent", updated.take(MAX_STORED_RECENT_EMOJIS).joinToString(",")) 923 .apply() 924 }../../src/main/java/com/nextcloud/talk/utils/message/MessageUtils.kt:89:
86 builder.linkResolver { view: View?, link: String? -> 87 val url = link?.takeIf { it.isNotBlank() } ?: return@linkResolver 88 try { 89 context.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url))) 90 } catch (e: ActivityNotFoundException) { 91 Log.w(TAG, "No activity found to open markdown link: $url", e) 92 }
UseKtx
Productivity
Warning
Priority 6/10
Accessibility in Custom Views
../../src/main/java/com/nextcloud/talk/ui/SwipeToCloseLayout.kt:47:
44 return dragHelper.shouldInterceptTouchEvent(ev) 45 } 46 47 override fun onTouchEvent(ev: MotionEvent): Boolean { 48 dragHelper.processTouchEvent(ev) 49 return true 50 }
ClickableViewAccessibility
Accessibility
Warning
Priority 6/10
Included Additional Checks
This card lists all the extra checks run by lint, provided from libraries,
build configuration and extra flags. This is included to help you verify
whether a particular check is included in analysis when configuring builds.
(Note that the list does not include the hundreds of built-in checks into lint,
only additional ones.)
Disabled Checks
One or more issues were not run by lint, either
because the check is not enabled by default, or because
it was disabled with a command line flag or via one or
more
lint.xml configuration files in the project directories.
Suppressing Warnings and Errors
Lint errors can be suppressed in a variety of ways:
1. With a
2. With a
3. With a //noinspection comment in the source code
4. With ignore flags specified in the
5. With a
6. With a
7. With the --ignore flag passed to lint.
To suppress a lint warning with an annotation, add a
To suppress a lint warning with a comment, add a
To suppress a lint warning in an XML file, add a
To suppress a lint warning in a
Here we specify a comma separated list of issue id's after the disable command. You can also use
To suppress lint warnings with a configuration XML file, create a file named
The format of the
To suppress lint checks from the command line, pass the --ignore flag with a comma separated list of ids to be suppressed, such as:
For more information, see https://developer.android.com/studio/write/lint.html#config
1. With a
@SuppressLint annotation in the Java code2. With a
tools:ignore attribute in the XML file3. With a //noinspection comment in the source code
4. With ignore flags specified in the
build.gradle file, as explained below5. With a
lint.xml configuration file in the project6. With a
lint.xml configuration file passed to lint via the --config flag7. With the --ignore flag passed to lint.
To suppress a lint warning with an annotation, add a
@SuppressLint("id") annotation on the class, method or variable declaration closest to the warning instance you want to disable. The id can be one or more issue id's, such as "UnusedResources" or {"UnusedResources","UnusedIds"}, or it can be "all" to suppress all lint warnings in the given scope.To suppress a lint warning with a comment, add a
//noinspection id comment on the line before the statement with the error.To suppress a lint warning in an XML file, add a
tools:ignore="id" attribute on the element containing the error, or one of its surrounding elements. You also need to define the namespace for the tools prefix on the root element in your document, next to the xmlns:android declaration:xmlns:tools="http://schemas.android.com/tools"To suppress a lint warning in a
build.gradle file, add a section like this:
android {
lintOptions {
disable 'TypographyFractions','TypographyQuotes'
}
}
Here we specify a comma separated list of issue id's after the disable command. You can also use
warning or error instead of disable to change the severity of issues.To suppress lint warnings with a configuration XML file, create a file named
lint.xml and place it at the root directory of the module in which it applies.The format of the
lint.xml file is something like the following:
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<!-- Ignore everything in the test source set -->
<issue id="all">
<ignore path="\*/test/\*" />
</issue>
<!-- Disable this given check in this project -->
<issue id="IconMissingDensityFolder" severity="ignore" />
<!-- Ignore the ObsoleteLayoutParam issue in the given files -->
<issue id="ObsoleteLayoutParam">
<ignore path="res/layout/activation.xml" />
<ignore path="res/layout-xlarge/activation.xml" />
<ignore regexp="(foo|bar)\.java" />
</issue>
<!-- Ignore the UselessLeaf issue in the given file -->
<issue id="UselessLeaf">
<ignore path="res/layout/main.xml" />
</issue>
<!-- Change the severity of hardcoded strings to "error" -->
<issue id="HardcodedText" severity="error" />
</lint>
To suppress lint checks from the command line, pass the --ignore flag with a comma separated list of ids to be suppressed, such as:
$ lint --ignore UnusedResources,UselessLeaf /my/project/pathFor more information, see https://developer.android.com/studio/write/lint.html#config