Lint Report: 15 warnings
Issue Types

Overview

Correctness
1warning OldTargetApi: Target SDK attribute is not targeting latest version
1warning PictureInPictureIssue: Picture In Picture best practices not followed
2warning SelectedPhotoAccess: Behavior change when requesting photo library access
Correctness:Chrome OS
1warning ChromeOsAbiSupport: Missing ABI Support for ChromeOS
Security
1warning AcceptsUserCertificates: Allowing User Certificates
1warning CustomX509TrustManager: Implements custom TLS trust manager
1warning ExportedService: Exported service does not require permission
1warning InsecureBaseConfiguration: Insecure Base Configuration
1warning DataExtractionRules: Missing data extraction rules
Performance
1warning NotifyDataSetChanged: Invalidating All RecyclerView Data
1warning ObsoleteSdkInt: Obsolete SDK_INT Version Check
1warning ViewHolder: View Holder Candidates
1warning Overdraw: Overdraw: Painting regions more than once
1warning 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: Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details.
  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: An activity in this app supports picture-in-picture and the targetSdkVersion is 31 or above; it is therefore strongly recommended to call both setAutoEnterEnabled(true) and setSourceRectHint(...)
  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: Your app is currently not handling Selected Photos Access introduced in Android 14+
  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: Your app is currently not handling Selected Photos Access introduced in Android 14+
  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: Missing x86_64 ABI support for ChromeOS
 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: The Network Security Configuration allows the use of user certificates in the release version of your app
 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: Implementing a custom X509TrustManager is error-prone and likely to be insecure. It is likely to disable certificate validation altogether, and is non-trivial to implement correctly without calling Android's default implementation.
  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: Exported service does not require permission
 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: Insecure Base Configuration
  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: The attribute android:fullBackupContent is deprecated from Android 12 and higher and may be removed in future versions. Consider adding the attribute android:dataExtractionRules specifying an @xml resource which configures cloud backups and device transfers on Android 12 and higher.
  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: It will always be more efficient to use more specific change events if you can. Rely on notifyDataSetChanged as a last resort.
 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

../../src/main/res/mipmap-anydpi-v26: This folder configuration (v26) is unnecessary; minSdkVersion is 26. Merge all the resources in this folder into mipmap-anydpi.
ObsoleteSdkInt Performance Warning Priority 6/10

View Holder Candidates

../../src/main/java/com/nextcloud/talk/ui/dialog/DialogBanListFragment.kt:66: Unconditional layout inflation from view adapter: Should use View Holder pattern (use recycled view passed into this method as the second parameter) for smoother scrolling
  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: Possible overdraw: Root element paints background @color/bg_default with a theme that also paints a background (inferred theme is @style/AppTheme.Launcher)
  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: activity_settings.xml has more than 80 views, bad for performance
  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 @SuppressLint annotation in the Java code
2. With a tools:ignore attribute in the XML file
3. With a //noinspection comment in the source code
4. With ignore flags specified in the build.gradle file, as explained below
5. With a lint.xml configuration file in the project
6. With a lint.xml configuration file passed to lint via the --config flag
7. 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/path

For more information, see https://developer.android.com/studio/write/lint.html#config