Overview
| Correctness | |
| 2 | warning ScopedStorage: Affected by scoped storage |
| 1 | warning InlinedApi: Using inlined constants on older versions |
| 1 | warning OldTargetApi: Target SDK attribute is not targeting latest version |
| 2 | warning SimpleDateFormat: Implied locale in date format |
| 1 | warning UnusedAttribute: Attribute unused on older versions |
| 1 | warning AppBundleLocaleChanges: App Bundle handling of runtime locale changes |
| 1 | warning RedundantLabel: Redundant label on activity |
| 3 | warning AndroidGradlePluginVersion: Obsolete Android Gradle Plugin Version |
| 96 | warning GradleDependency: Obsolete Gradle Dependency |
| 1 | warning LockedOrientationActivity: Incompatible screenOrientation value |
| 6 | warning SimilarGradleDependency: Multiple Versions Gradle Dependency |
| 1 | warning DiscouragedApi: Using discouraged APIs |
| Security | |
| 3 | warning TrustAllX509TrustManager: Insecure TLS/SSL trust manager |
| Performance | |
| 5 | warning ObsoleteSdkInt: Obsolete SDK_INT Version Check |
| 1 | warning
AutoboxingStateCreation: State<T> will autobox values assigned to this state. Use a specialized state type instead. |
| 20 | warning UnusedResources: Unused resources |
| Included Additional Checks (70) | |
| Disabled Checks (41) |
Affected by scoped storage
../../src/main/AndroidManifest.xml:43:
40 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> 41 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> 42 43 <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> 44 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 45 <uses-permission 46 android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"../../src/main/AndroidManifest.xml:44:
41 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> 42 43 <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> 44 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 45 <uses-permission 46 android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" 47 />
ScopedStorage
Correctness
Warning
Priority 8/10
Using inlined constants on older versions
../../src/main/java/com/greybox/projectmesh/views/RequestPermissionScreen.kt:69:
66 0 -> { // Request Nearby Wi-Fi Permission 67 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && 68 !hasPermission(context, Manifest.permission.NEARBY_WIFI_DEVICES)) { 69 nearbyWifiPermissionLauncher.launch(Manifest.permission.NEARBY_WIFI_DEVICES) 70 } else { 71 currentStep = 1 72 }
InlinedApi
Correctness
Warning
Priority 6/10
Target SDK attribute is not targeting latest version
../../build.gradle.kts:18:
15 defaultConfig { 16 applicationId = "com.greybox.projectmesh" 17 minSdk = 26 18 targetSdk = 34 19 versionCode = 1 20 versionName = "1.0"
OldTargetApi
Correctness
Warning
Priority 6/10
Implied locale in date format
../../src/main/java/com/greybox/projectmesh/messaging/ui/screens/ChatScreen.kt:536:
533 horizontalArrangement = Arrangement.End 534 ) { 535 Text( 536 text = SimpleDateFormat("HH:mm").format(Date(chatMessage.dateReceived)), 537 style = MaterialTheme.typography.labelSmall 538 ) 539 }../../src/main/java/com/greybox/projectmesh/messaging/utils/MessageUtils.kt:17:
14 */ 15 fun formatTimestamp(timestamp: Long): String { 16 //Adding timestamp formatting logic 17 return java.text.SimpleDateFormat("HH:mm").format(timestamp) 18 } 19 20 /**
SimpleDateFormat
Correctness
Warning
Priority 6/10
Attribute unused on older versions
../../src/main/AndroidManifest.xml:38:
35 --> 36 <uses-permission 37 android:name="android.permission.NEARBY_WIFI_DEVICES" 38 android:usesPermissionFlags="neverForLocation" 39 /> 40 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> 41 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
UnusedAttribute
Correctness
Warning
Priority 6/10
App Bundle handling of runtime locale changes
../../src/main/java/com/greybox/projectmesh/MainActivity.kt:224:
221 private fun updateLocale(languageCode: String): Locale { 222 val locale = Locale(languageCode) 223 val config = resources.configuration 224 config.setLocale(locale) 225 @Suppress("DEPRECATION") 226 resources.updateConfiguration(config, resources.displayMetrics) 227 return locale
AppBundleLocaleChanges
Correctness
Warning
Priority 5/10
Redundant label on activity
../../src/main/AndroidManifest.xml:82:
79 <activity 80 android:name=".MainActivity" 81 android:exported="true" 82 android:label="@string/app_name" 83 android:theme="@style/Theme.ProjectMesh.Launcher" 84 > 85 <intent-filter>
RedundantLabel
Correctness
Warning
Priority 5/10
Obsolete Android Gradle Plugin Version
../../../gradle/libs.versions.toml:7:
4 acraHTTP = "5.11.0" 5 activity = "1.9.0" 6 activityCompose = "1.7.0" 7 agp = "8.5.1" 8 appcompat = "1.6.1" 9 coilCompose = "1.4.0" 10 composeBom = "2023.08.00"../../../gradle/libs.versions.toml:7:
4 acraHTTP = "5.11.0" 5 activity = "1.9.0" 6 activityCompose = "1.7.0" 7 agp = "8.5.1" 8 appcompat = "1.6.1" 9 coilCompose = "1.4.0" 10 composeBom = "2023.08.00"../../../gradle/libs.versions.toml:7:
4 acraHTTP = "5.11.0" 5 activity = "1.9.0" 6 activityCompose = "1.7.0" 7 agp = "8.5.1" 8 appcompat = "1.6.1" 9 coilCompose = "1.4.0" 10 composeBom = "2023.08.00"
AndroidGradlePluginVersion
Correctness
Warning
Priority 4/10
Obsolete Gradle Dependency
../../../gradle/libs.versions.toml:5:
2 accompanistPermissions = "0.31.1-alpha" 3 acraDialog = "5.11.0" 4 acraHTTP = "5.11.0" 5 activity = "1.9.0" 6 activityCompose = "1.7.0" 7 agp = "8.5.1" 8 appcompat = "1.6.1"../../../gradle/libs.versions.toml:5:
2 accompanistPermissions = "0.31.1-alpha" 3 acraDialog = "5.11.0" 4 acraHTTP = "5.11.0" 5 activity = "1.9.0" 6 activityCompose = "1.7.0" 7 agp = "8.5.1" 8 appcompat = "1.6.1"../../../gradle/libs.versions.toml:5:
2 accompanistPermissions = "0.31.1-alpha" 3 acraDialog = "5.11.0" 4 acraHTTP = "5.11.0" 5 activity = "1.9.0" 6 activityCompose = "1.7.0" 7 agp = "8.5.1" 8 appcompat = "1.6.1"../../../gradle/libs.versions.toml:6:
3 acraDialog = "5.11.0" 4 acraHTTP = "5.11.0" 5 activity = "1.9.0" 6 activityCompose = "1.7.0" 7 agp = "8.5.1" 8 appcompat = "1.6.1" 9 coilCompose = "1.4.0"../../../gradle/libs.versions.toml:6:
3 acraDialog = "5.11.0" 4 acraHTTP = "5.11.0" 5 activity = "1.9.0" 6 activityCompose = "1.7.0" 7 agp = "8.5.1" 8 appcompat = "1.6.1" 9 coilCompose = "1.4.0"+ 91 More Occurrences...
GradleDependency
Correctness
Warning
Priority 4/10
Incompatible screenOrientation value
../../src/main/AndroidManifest.xml:105:
102 </provider> 103 <activity 104 android:name="com.journeyapps.barcodescanner.CaptureActivity" 105 android:screenOrientation="portrait" 106 android:stateNotNeeded="true" 107 tools:replace="android:screenOrientation" 108 />
LockedOrientationActivity
Correctness
Warning
Priority 4/10
Multiple Versions Gradle Dependency
../../../gradle/libs.versions.toml:58:
55 androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" } 56 androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } 57 androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } 58 androidx-datastore-core = { group = "androidx.datastore", name = "datastore-core", version.ref = "datastoreCore" } 59 androidx-datastore-core-v111 = { module = "androidx.datastore:datastore-core", version.ref = "datastoreCoreVersion" } 60 androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" } 61 androidx-datastore-preferences-core = { group = "androidx.datastore", name = "datastore-preferences-core", version.ref = "datastorePreferencesCore" }../../../gradle/libs.versions.toml:58:
55 androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" } 56 androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } 57 androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } 58 androidx-datastore-core = { group = "androidx.datastore", name = "datastore-core", version.ref = "datastoreCore" } 59 androidx-datastore-core-v111 = { module = "androidx.datastore:datastore-core", version.ref = "datastoreCoreVersion" } 60 androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" } 61 androidx-datastore-preferences-core = { group = "androidx.datastore", name = "datastore-preferences-core", version.ref = "datastorePreferencesCore" }../../../gradle/libs.versions.toml:58:
55 androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" } 56 androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } 57 androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } 58 androidx-datastore-core = { group = "androidx.datastore", name = "datastore-core", version.ref = "datastoreCore" } 59 androidx-datastore-core-v111 = { module = "androidx.datastore:datastore-core", version.ref = "datastoreCoreVersion" } 60 androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" } 61 androidx-datastore-preferences-core = { group = "androidx.datastore", name = "datastore-preferences-core", version.ref = "datastorePreferencesCore" }../../../gradle/libs.versions.toml:59:
56 androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } 57 androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } 58 androidx-datastore-core = { group = "androidx.datastore", name = "datastore-core", version.ref = "datastoreCore" } 59 androidx-datastore-core-v111 = { module = "androidx.datastore:datastore-core", version.ref = "datastoreCoreVersion" } 60 androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" } 61 androidx-datastore-preferences-core = { group = "androidx.datastore", name = "datastore-preferences-core", version.ref = "datastorePreferencesCore" } 62 androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }../../../gradle/libs.versions.toml:59:
56 androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } 57 androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } 58 androidx-datastore-core = { group = "androidx.datastore", name = "datastore-core", version.ref = "datastoreCore" } 59 androidx-datastore-core-v111 = { module = "androidx.datastore:datastore-core", version.ref = "datastoreCoreVersion" } 60 androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" } 61 androidx-datastore-preferences-core = { group = "androidx.datastore", name = "datastore-preferences-core", version.ref = "datastorePreferencesCore" } 62 androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }../../../gradle/libs.versions.toml:59:
56 androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } 57 androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } 58 androidx-datastore-core = { group = "androidx.datastore", name = "datastore-core", version.ref = "datastoreCore" } 59 androidx-datastore-core-v111 = { module = "androidx.datastore:datastore-core", version.ref = "datastoreCoreVersion" } 60 androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" } 61 androidx-datastore-preferences-core = { group = "androidx.datastore", name = "datastore-preferences-core", version.ref = "datastorePreferencesCore" } 62 androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
SimilarGradleDependency
Correctness
Information
Priority 4/10
Using discouraged APIs
../../src/main/AndroidManifest.xml:105:
102 </provider> 103 <activity 104 android:name="com.journeyapps.barcodescanner.CaptureActivity" 105 android:screenOrientation="portrait" 106 android:stateNotNeeded="true" 107 tools:replace="android:screenOrientation" 108 />
DiscouragedApi
Correctness
Warning
Priority 2/10
Insecure TLS/SSL trust manager
../../../../../../.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcpkix-jdk18on/1.75/5adfef8a71a0933454739264b56283cc73dd2383/bcpkix-jdk18on-1.75.jar:
../../../../../../.gradle/caches/modules-2/files-2.1/com.athaydes.rawhttp/rawhttp-core/2.5.2/cbd0e0de9c307aeb5b1931221e70599c064fa20a/rawhttp-core-2.5.2.jar:
../../../../../../.gradle/caches/modules-2/files-2.1/com.athaydes.rawhttp/rawhttp-core/2.5.2/cbd0e0de9c307aeb5b1931221e70599c064fa20a/rawhttp-core-2.5.2.jar:
../../../../../../.gradle/caches/modules-2/files-2.1/com.athaydes.rawhttp/rawhttp-core/2.5.2/cbd0e0de9c307aeb5b1931221e70599c064fa20a/rawhttp-core-2.5.2.jar:
../../../../../../.gradle/caches/modules-2/files-2.1/com.athaydes.rawhttp/rawhttp-core/2.5.2/cbd0e0de9c307aeb5b1931221e70599c064fa20a/rawhttp-core-2.5.2.jar:
TrustAllX509TrustManager
Security
Warning
Priority 6/10
Obsolete SDK_INT Version Check
../../src/main/java/com/greybox/projectmesh/util/NotificationHelper.kt:29:
26 * @param context Application context used to access the system NotificationManager 27 */ 28 fun createNotificationChannel(context: Context) { 29 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { 30 val channel = NotificationChannel( 31 CHANNEL_ID, 32 CHANNEL_NAME,../../src/main/java/com/greybox/projectmesh/views/RequestPermissionScreen.kt:67:
64 if (currentStep == 6) return@LaunchedEffect 65 when (currentStep) { 66 0 -> { // Request Nearby Wi-Fi Permission 67 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && 68 !hasPermission(context, Manifest.permission.NEARBY_WIFI_DEVICES)) { 69 nearbyWifiPermissionLauncher.launch(Manifest.permission.NEARBY_WIFI_DEVICES) 70 } else {../../src/main/java/com/greybox/projectmesh/views/RequestPermissionScreen.kt:75:
72 } 73 } 74 1 -> { // Request Location Permission 75 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && 76 !hasPermission(context, Manifest.permission.ACCESS_FINE_LOCATION)) { 77 locationPermissionLauncher.launch(Manifest.permission.ACCESS_FINE_LOCATION) 78 } else {../../src/main/java/com/greybox/projectmesh/views/RequestPermissionScreen.kt:135:
132 /** Function to Check If Battery Optimization is Disabled */ 133 fun isBatteryOptimizationDisabled(context: Context): Boolean { 134 val powerManager = context.getSystemService(Context.POWER_SERVICE) as PowerManager 135 return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { 136 powerManager.isIgnoringBatteryOptimizations(context.packageName) 137 } else { 138 true // Battery optimization doesn't apply below Android 6.0../../src/main/java/com/greybox/projectmesh/views/RequestPermissionScreen.kt:144:
141 142 /** Function to Prompt User to Disable Battery Optimization */ 143 fun promptDisableBatteryOptimization(context: Context) { 144 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { 145 val message = SpannableString( 146 "To ensure uninterrupted background functionality and maintain a stable connection, " + 147 "please disable battery optimization for this app.\n\n" +
ObsoleteSdkInt
Performance
Warning
Priority 6/10
State<T> will autobox values assigned to this state. Use a specialized state type instead.
../../src/main/java/com/greybox/projectmesh/MainActivity.kt:111:
108 mutableStateOf(settingPref.getString( 109 "language", "en") ?: "en") 110 } 111 var restartServerKey by remember {mutableStateOf(0)} 112 var deviceName by remember { 113 mutableStateOf(settingPref.getString("device_name", Build.MODEL) ?: Build.MODEL) 114 }
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
Information
Priority 3/10
Unused resources
../../src/main/res/layout/activity_crash_screen.xml:2:
1 <?xml version="1.0" encoding="utf-8" ?> 2 <androidx.constraintlayout.widget.ConstraintLayout 3 xmlns:android="http://schemas.android.com/apk/res/android" 4 xmlns:app="http://schemas.android.com/apk/res-auto" 5 xmlns:tools="http://schemas.android.com/tools"../../src/main/res/layout/activity_main.xml:2:
1 <?xml version="1.0" encoding="utf-8" ?> 2 <androidx.constraintlayout.widget.ConstraintLayout 3 xmlns:android="http://schemas.android.com/apk/res/android" 4 xmlns:app="http://schemas.android.com/apk/res-auto" 5 xmlns:tools="http://schemas.android.com/tools"../../src/main/res/values/colors.xml:3:
1 <?xml version="1.0" encoding="utf-8" ?> 2 <resources> 3 <color name="purple_200">#FFBB86FC</color> 4 <color name="purple_500">#FF6200EE</color> 5 <color name="purple_700">#FF3700B3</color> 6 <color name="teal_200">#FF03DAC5</color>../../src/main/res/values/colors.xml:4:
1 <?xml version="1.0" encoding="utf-8" ?> 2 <resources> 3 <color name="purple_200">#FFBB86FC</color> 4 <color name="purple_500">#FF6200EE</color> 5 <color name="purple_700">#FF3700B3</color> 6 <color name="teal_200">#FF03DAC5</color> 7 <color name="teal_700">#FF018786</color>../../src/main/res/values/colors.xml:5:
2 <resources> 3 <color name="purple_200">#FFBB86FC</color> 4 <color name="purple_500">#FF6200EE</color> 5 <color name="purple_700">#FF3700B3</color> 6 <color name="teal_200">#FF03DAC5</color> 7 <color name="teal_700">#FF018786</color> 8 <color name="black">#FF000000</color>+ 15 More Occurrences...
UnusedResources
Performance
Warning
Priority 3/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