Overview
| Correctness | |
| 1 | warning OldTargetApi: Target SDK attribute is not targeting latest version |
| 1 | warning PictureInPictureIssue: Picture In Picture best practices not followed |
| 2 | warning SelectedPhotoAccess: Behavior change when requesting photo library access |
| Correctness:Chrome OS | |
| 1 | warning ChromeOsAbiSupport: Missing ABI Support for ChromeOS |
| Security | |
| 1 | warning AcceptsUserCertificates: Allowing User Certificates |
| 1 | warning CustomX509TrustManager: Implements custom TLS trust manager |
| 1 | warning ExportedService: Exported service does not require permission |
| 1 | warning InsecureBaseConfiguration: Insecure Base Configuration |
| 1 | warning DataExtractionRules: Missing data extraction rules |
| Performance | |
| 1 | warning NotifyDataSetChanged: Invalidating All RecyclerView Data |
| 1 | warning ObsoleteSdkInt: Obsolete SDK_INT Version Check |
| 1 | warning ViewHolder: View Holder Candidates |
| 1 | warning Overdraw: Overdraw: Painting regions more than once |
| 1 | warning TooManyViews: Layout has too many views |
| Included Additional Checks (97) | |
| Disabled Checks (47) |
Target SDK attribute is not targeting latest version
../../build.gradle.kts:69:
66 providers.gradleProperty("NC_TEST_SERVER_PASSWORD").getOrElse("") 67 68 minSdk = 26 69 targetSdk = 36 70 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 71 72 // mayor.minor.hotfix.increment (for increment: 01-50=Alpha / 51-89=RC / 90-99=stable)
OldTargetApi
Correctness
Warning
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
Missing ABI Support for ChromeOS
../../build.gradle.kts:150:
147 splits.abi { 148 isEnable = true 149 reset() 150 include(*abiVersionCodes.keys.toTypedArray()) 151 isUniversalApk = false 152 } 153 }
ChromeOsAbiSupport
Chrome OS
Correctness
Warning
Priority 4/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:50:
47 * User-accepted certificates are stored under the alias {@code <host>|<sha256 of the certificate>}, so each one is 48 * only trusted for the host it was accepted for. Entries stored under any other alias are not honoured. 49 */ 50 public class TrustManager extends X509ExtendedTrustManager { 51 private static final String TAG = "TrustManager"; 52 private static final String ALIAS_SEPARATOR = "|";
CustomX509TrustManager
Security
Warning
Priority 5/10
Exported service does not require permission
../../src/main/AndroidManifest.xml:331:
328 android:name=".receivers.EndCallReceiver" 329 android:exported="false" /> 330 331 <service 332 android:name=".utils.SyncService" 333 android:exported="true"> 334 <intent-filter>
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/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
View Holder Candidates
../../src/main/java/com/nextcloud/talk/ui/dialog/DialogBanListFragment.kt:66:
63 override fun getItemId(position: Int): Long = bans[position].bannedTime!!.toLong() 64 65 override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View { 66 val binding = BanItemListBinding.inflate(LayoutInflater.from(context)) 67 binding.banActorName.text = bans[position].bannedDisplayName 68 val time = bans[position].bannedTime!!.toLong() * ONE_SEC 69 binding.banTime.text = DateUtils.formatDateTime(
ViewHolder
Performance
Warning
Priority 5/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
Layout has too many views
../../src/main/res/layout/activity_settings.xml:622:
619 android:orientation="horizontal" 620 android:padding="@dimen/standard_padding"> 621 622 <LinearLayout 623 android:layout_width="0dp" 624 android:layout_height="wrap_content" 625 android:layout_weight="1"
TooManyViews
Performance
Warning
Priority 1/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