Overview
Correctness | |
1 | error MissingPermission: Missing Permissions |
3 | warning
ApplySharedPref: Use apply() on SharedPreferences |
3 | warning DefaultLocale: Implied default locale in case conversion |
2 | warning OldTargetApi: Target SDK attribute is not targeting latest version |
1 | warning SimpleDateFormat: Implied locale in date format |
1 | warning UnusedAttribute: Attribute unused on older versions |
4 | error AppCompatCustomView: Appcompat Custom Widgets |
1 | warning GradleDependency: Obsolete Gradle Dependency |
5 | warning GradleDynamicVersion: Gradle Dynamic Version |
4 | warning GradleOverrides: Value overridden by Gradle build script |
2 | error RestrictedApi: Restricted API |
Security | |
2 | warning HardwareIds: Hardware Id Usage |
1 | warning AllowBackup: AllowBackup/FullBackupContent Problems |
Performance | |
1 | warning WakelockTimeout: Using wakeLock without timeout |
2 | warning ObsoleteSdkInt: Obsolete SDK_INT Version Check |
3 | warning StaticFieldLeak: Static Field Leaks |
22 | warning UnusedResources: Unused resources |
Usability:Icons | |
1 | warning IconDipSize: Icon density-independent size validation |
1 | warning IconDuplicatesConfig: Identical bitmaps across various configurations |
1 | warning IconLocation: Image defined in density-independent drawable folder |
3 | warning IconDensities: Icon densities validation |
Usability | |
1 | warning GoogleAppIndexingWarning: Missing support for Firebase App Indexing |
12 | warning ViewConstructor: Missing View constructors for XML inflation |
Accessibility | |
1 | warning ClickableViewAccessibility: Accessibility in Custom Views |
Disabled Checks (32) |
Missing Permissions
../../src/org/muctec/smartfritz/Controls.java:2421:
2418 TelephonyManager telephony = (TelephonyManager) activity.getSystemService(Context.TELEPHONY_SERVICE); 2419 if (telephony!=null) { 2420 try { 2421 f = telephony.getDeviceId(); 2422 } catch (SecurityException ex) { 2423 Log.e("getDevDeviceID", ex.getMessage()); 2424 }
MissingPermission
Correctness
Error
Priority 9/10
Implied default locale in case conversion
../../src/org/muctec/smartfritz/Controls.java:1525:
1522 if (isIPv4) return r = inetAddress.getHostAddress(); 1523 if (!isIPv4) { 1524 int delim = inetAddress.getHostAddress().indexOf('%'); // drop ip6 zone suffix 1525 r = delim < 0 ? inetAddress.getHostAddress().toUpperCase() : inetAddress.getHostAddress().substring(0, delim).toUpperCase(); 1526 } 1527 } 1528 }../../src/org/muctec/smartfritz/Controls.java:1525:
1522 if (isIPv4) return r = inetAddress.getHostAddress(); 1523 if (!isIPv4) { 1524 int delim = inetAddress.getHostAddress().indexOf('%'); // drop ip6 zone suffix 1525 r = delim < 0 ? inetAddress.getHostAddress().toUpperCase() : inetAddress.getHostAddress().substring(0, delim).toUpperCase(); 1526 } 1527 } 1528 }../../src/org/muctec/smartfritz/Controls.java:1543:
1540 1541 //String ip = Formatter.formatIpAddress( 1542 int ipAddress = mWifi.getConnectionInfo().getIpAddress(); 1543 String sIP = String.format("%d.%d.%d.%d", 1544 (ipAddress & 0xff), 1545 (ipAddress >> 8 & 0xff), 1546 (ipAddress >> 16 & 0xff),
DefaultLocale
Correctness
Warning
Priority 6/10
Target SDK attribute is not targeting latest version
../../AndroidManifest.xml:3:
1 <?xml version="1.0" encoding="UTF-8"?> 2 <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.muctec.smartfritz" android:versionCode="1" android:versionName="1.0"> 3 <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="28"/> 4 <uses-permission android:name="android.permission.ACCESS_BLUETOOTH_SHARE"/> 5 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> 6 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>../../build.gradle:34:
31 compileSdkVersion 28 32 defaultConfig { 33 minSdkVersion 14 34 targetSdkVersion 28 35 versionCode 1 36 versionName "1.0" 37 }
OldTargetApi
Correctness
Warning
Priority 6/10
Implied locale in date format
../../src/org/muctec/smartfritz/Controls.java:638:
635 636 //by TR3E 637 public String GetTimeHHssSS( long millisTime ) { 638 SimpleDateFormat formatter = new SimpleDateFormat ( "mm:ss:SS" ); 639 return( formatter.format ( new Date (millisTime) ) ); 640 }
SimpleDateFormat
Correctness
Warning
Priority 6/10
Attribute unused on older versions
../../AndroidManifest.xml:39:
36 <uses-feature android:name="android.hardware.sensor.stepcounter" android:required="false"/> 37 <uses-feature android:name="android.hardware.sensor.stepdetector" android:required="false"/> 38 <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true"/> 39 <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" android:networkSecurityConfig="@xml/network_security_config"> 40 <activity android:name="org.muctec.smartfritz.App" android:label="@string/app_name" android:configChanges="orientation|keyboardHidden|screenSize|screenLayout|fontScale" android:launchMode="standard" android:enabled="true"> 41 <intent-filter> 42 <action android:name="android.intent.action.MAIN"/>
UnusedAttribute
Correctness
Warning
Priority 6/10
Appcompat Custom Widgets
../../src/org/muctec/smartfritz/jButton.java:24:
21 import android.view.ViewGroup; 22 import android.widget.Button; 23 24 public class jButton extends Button { 25 26 private Controls controls = null; // Control Class for Event 27 private jCommons LAMWCommon;../../src/org/muctec/smartfritz/jCheckBox.java:13:
10 import android.widget.CheckBox; 11 import android.view.Gravity; 12 13 public class jCheckBox extends CheckBox { 14 //Java-Pascal Interface 15 private long PasObj = 0; // Pascal Obj 16 private Controls controls = null; // Control Class for Event../../src/org/muctec/smartfritz/jEditText.java:42:
39 40 //Reviewed by TR3E on 08/20/2019 41 42 public class jEditText extends EditText { 43 //Pascal Interface 44 //private long PasObj = 0; // Pascal Obj 45 private Controls controls = null; // Control Class for Event../../src/org/muctec/smartfritz/jTextView.java:37:
34 import android.view.Gravity; 35 import android.widget.TextView; 36 37 public class jTextView extends TextView { 38 //Java-Pascal Interface 39 private Controls controls = null; // Control Class for Event 40 private jCommons LAMWCommon;
AppCompatCustomView
Correctness
Error
Priority 4/10
Obsolete Gradle Dependency
../../build.gradle:8:
5 google() 6 } 7 dependencies { 8 classpath 'com.android.tools.build:gradle:3.4.1' 9 } 10 } 11 allprojects {
GradleDependency
Correctness
Warning
Priority 4/10
Gradle Dynamic Version
../../build.gradle:56:
53 } 54 dependencies { 55 implementation fileTree(include: ['*.jar'], dir: 'libs') 56 implementation 'com.android.support:support-v4:28.+' 57 implementation 'com.android.support:appcompat-v7:28.+' 58 implementation 'com.android.support:design:28.+' 59 implementation 'com.android.support:cardview-v7:28.+'../../build.gradle:57:
54 dependencies { 55 implementation fileTree(include: ['*.jar'], dir: 'libs') 56 implementation 'com.android.support:support-v4:28.+' 57 implementation 'com.android.support:appcompat-v7:28.+' 58 implementation 'com.android.support:design:28.+' 59 implementation 'com.android.support:cardview-v7:28.+' 60 implementation 'com.android.support:recyclerview-v7:28.+'../../build.gradle:58:
55 implementation fileTree(include: ['*.jar'], dir: 'libs') 56 implementation 'com.android.support:support-v4:28.+' 57 implementation 'com.android.support:appcompat-v7:28.+' 58 implementation 'com.android.support:design:28.+' 59 implementation 'com.android.support:cardview-v7:28.+' 60 implementation 'com.android.support:recyclerview-v7:28.+' 61 }../../build.gradle:59:
56 implementation 'com.android.support:support-v4:28.+' 57 implementation 'com.android.support:appcompat-v7:28.+' 58 implementation 'com.android.support:design:28.+' 59 implementation 'com.android.support:cardview-v7:28.+' 60 implementation 'com.android.support:recyclerview-v7:28.+' 61 } 62../../build.gradle:60:
57 implementation 'com.android.support:appcompat-v7:28.+' 58 implementation 'com.android.support:design:28.+' 59 implementation 'com.android.support:cardview-v7:28.+' 60 implementation 'com.android.support:recyclerview-v7:28.+' 61 } 62 63 task run(type: Exec, dependsOn: ':installDebug') {
GradleDynamicVersion
Correctness
Warning
Priority 4/10
Value overridden by Gradle build script
../../AndroidManifest.xml:2:
1 <?xml version="1.0" encoding="UTF-8"?> 2 <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.muctec.smartfritz" android:versionCode="1" android:versionName="1.0"> 3 <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="28"/> 4 <uses-permission android:name="android.permission.ACCESS_BLUETOOTH_SHARE"/> 5 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>../../AndroidManifest.xml:2:
1 <?xml version="1.0" encoding="UTF-8"?> 2 <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.muctec.smartfritz" android:versionCode="1" android:versionName="1.0"> 3 <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="28"/> 4 <uses-permission android:name="android.permission.ACCESS_BLUETOOTH_SHARE"/> 5 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>../../AndroidManifest.xml:3:
1 <?xml version="1.0" encoding="UTF-8"?> 2 <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.muctec.smartfritz" android:versionCode="1" android:versionName="1.0"> 3 <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="28"/> 4 <uses-permission android:name="android.permission.ACCESS_BLUETOOTH_SHARE"/> 5 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> 6 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>../../AndroidManifest.xml:3:
1 <?xml version="1.0" encoding="UTF-8"?> 2 <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.muctec.smartfritz" android:versionCode="1" android:versionName="1.0"> 3 <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="28"/> 4 <uses-permission android:name="android.permission.ACCESS_BLUETOOTH_SHARE"/> 5 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> 6 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
GradleOverrides
Correctness
Warning
Priority 4/10
Restricted API
../../src/org/muctec/smartfritz/jsFloatingButton.java:116:
113 //GUIDELINE: please, preferentially, init all yours params names with "_", ex: int _flag, String _hello ... 114 115 public void SetVisibility(int _value) { // 116 this.setVisibility(_value); //View.GONE=8 View.VISIBLE=0 View.INVISIBLE=4 117 } 118 119 public void SetCompatElevation(float _value){../../src/org/muctec/smartfritz/jsFloatingButton.java:207:
204 parent.invalidate(); 205 } 206 } 207 this.setVisibility(android.view.View.VISIBLE); 208 } 209 }
RestrictedApi
Correctness
Error
Priority 4/10
Hardware Id Usage
../../src/org/muctec/smartfritz/Controls.java:2406:
2403 TelephonyManager telephony = (TelephonyManager) activity.getSystemService(Context.TELEPHONY_SERVICE); 2404 if (telephony!=null) { 2405 try { 2406 f = telephony.getLine1Number(); 2407 } catch (SecurityException ex) { 2408 Log.e("getDevPhoneNumber", ex.getMessage()); 2409 }../../src/org/muctec/smartfritz/Controls.java:2421:
2418 TelephonyManager telephony = (TelephonyManager) activity.getSystemService(Context.TELEPHONY_SERVICE); 2419 if (telephony!=null) { 2420 try { 2421 f = telephony.getDeviceId(); 2422 } catch (SecurityException ex) { 2423 Log.e("getDevDeviceID", ex.getMessage()); 2424 }
HardwareIds
Security
Warning
Priority 6/10
AllowBackup/FullBackupContent Problems
../../AndroidManifest.xml:39:
36 <uses-feature android:name="android.hardware.sensor.stepcounter" android:required="false"/> 37 <uses-feature android:name="android.hardware.sensor.stepdetector" android:required="false"/> 38 <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true"/> 39 <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" android:networkSecurityConfig="@xml/network_security_config"> 40 <activity android:name="org.muctec.smartfritz.App" android:label="@string/app_name" android:configChanges="orientation|keyboardHidden|screenSize|screenLayout|fontScale" android:launchMode="standard" android:enabled="true"> 41 <intent-filter> 42 <action android:name="android.intent.action.MAIN"/>
AllowBackup
Security
Warning
Priority 3/10
Using wakeLock without timeout
../../src/org/muctec/smartfritz/jHttpClient.java:1193:
1190 super.onPreExecute(); 1191 PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); 1192 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, getClass().getName()); 1193 mWakeLock.acquire(); 1194 } 1195 1196 @Override
WakelockTimeout
Performance
Warning
Priority 9/10
Obsolete SDK_INT Version Check
ObsoleteSdkInt
Performance
Warning
Priority 6/10
Static Field Leaks
../../src/org/muctec/smartfritz/jHttpClient.java:990:
987 Result: This is the type that doInBackground returns. 988 */ 989 990 class AsyncHttpClientPostNameValueData extends AsyncTask<String, Integer, String> { 991 992 @Override 993 protected String doInBackground(String... stringUrl) {../../src/org/muctec/smartfritz/jHttpClient.java:1075:
1072 } 1073 } 1074 1075 class AsyncHttpClientGet extends AsyncTask<String, Integer, String> { 1076 1077 @Override 1078 protected String doInBackground(String... stringUrl) {../../src/org/muctec/smartfritz/jHttpClient.java:1178:
1175 // </html> 1176 // 1177 1178 private class UploadTask extends AsyncTask<String, Integer, String> { 1179 1180 private Context context; 1181 private PowerManager.WakeLock mWakeLock;
StaticFieldLeak
Performance
Warning
Priority 6/10
Unused resources
../../res/layout/activity_app.xml:1:

../../res/values/colors.xml:7:
1 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 xmlns:tools="http://schemas.android.com/tools" 3 android:layout_width="match_parent" 4 android:layout_height="match_parent"../../res/drawable/bg_material.png:

../../res/values/colors.xml:7:
4 <color name="primary_light">#C5CAE9</color> 5 <color name="accent">#03A9F4</color> 6 <color name="primary_text">#212121</color> 7 <color name="secondary_text">#727272</color> 8 <color name="icons">#FFFFFF</color> 9 <color name="divider">#B6B6B6</color> 10 </resources>../../res/values/colors.xml:8:
5 <color name="accent">#03A9F4</color> 6 <color name="primary_text">#212121</color> 7 <color name="secondary_text">#727272</color> 8 <color name="icons">#FFFFFF</color> 9 <color name="divider">#B6B6B6</color> 10 </resources>../../res/values/colors.xml:9:
6 <color name="primary_text">#212121</color> 7 <color name="secondary_text">#727272</color> 8 <color name="icons">#FFFFFF</color> 9 <color name="divider">#B6B6B6</color> 10 </resources>+ 17 More Occurrences...
UnusedResources
Performance
Warning
Priority 3/10
Icon density-independent size validation
IconDipSize
Icons
Usability
Warning
Priority 5/10
Identical bitmaps across various configurations
IconDuplicatesConfig
Icons
Usability
Warning
Priority 5/10
Image defined in density-independent drawable folder
IconLocation
Icons
Usability
Warning
Priority 5/10
Icon densities validation
IconDensities
Icons
Usability
Warning
Priority 4/10
Missing support for Firebase App Indexing
../../AndroidManifest.xml:39:
36 <uses-feature android:name="android.hardware.sensor.stepcounter" android:required="false"/> 37 <uses-feature android:name="android.hardware.sensor.stepdetector" android:required="false"/> 38 <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true"/> 39 <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" android:networkSecurityConfig="@xml/network_security_config"> 40 <activity android:name="org.muctec.smartfritz.App" android:label="@string/app_name" android:configChanges="orientation|keyboardHidden|screenSize|screenLayout|fontScale" android:launchMode="standard" android:enabled="true"> 41 <intent-filter> 42 <action android:name="android.intent.action.MAIN"/>
GoogleAppIndexingWarning
Usability
Warning
Priority 5/10
Missing View constructors for XML inflation
../../src/org/muctec/smartfritz/jButton.java:24:
21 import android.view.ViewGroup; 22 import android.widget.Button; 23 24 public class jButton extends Button { 25 26 private Controls controls = null; // Control Class for Event 27 private jCommons LAMWCommon;../../src/org/muctec/smartfritz/jCheckBox.java:13:
10 import android.widget.CheckBox; 11 import android.view.Gravity; 12 13 public class jCheckBox extends CheckBox { 14 //Java-Pascal Interface 15 private long PasObj = 0; // Pascal Obj 16 private Controls controls = null; // Control Class for Event../../src/org/muctec/smartfritz/jEditText.java:42:
39 40 //Reviewed by TR3E on 08/20/2019 41 42 public class jEditText extends EditText { 43 //Pascal Interface 44 //private long PasObj = 0; // Pascal Obj 45 private Controls controls = null; // Control Class for Event../../src/org/muctec/smartfritz/jExpandableListView.java:411:
408 /*https://github.com/jmpessoa/lazandroidmodulewizard*/ 409 /*jVisualControl LAMW template*/ 410 411 public class jExpandableListView extends ExpandableListView /*dummy*/ { //please, fix what GUI object will be extended! 412 413 private long pascalObj = 0; // Pascal Object 414 private Controls controls = null; //Java/Pascal [events] Interface ...../../src/org/muctec/smartfritz/jPanel.java:23:
20 import android.view.animation.TranslateAnimation; 21 import android.widget.RelativeLayout; 22 23 public class jPanel extends RelativeLayout { 24 //Java-Pascal Interface 25 private long PasObj = 0; // Pascal Obj 26 private Controls controls = null; // Control Class for Event+ 7 More Occurrences...
ViewConstructor
Usability
Warning
Priority 3/10
Accessibility in Custom Views
../../src/org/muctec/smartfritz/jPanel.java:135:
132 } 133 134 @Override 135 public boolean onTouchEvent(MotionEvent event) { 136 return super.onTouchEvent(event); 137 }
ClickableViewAccessibility
Accessibility
Warning
Priority 6/10
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
android {
lintOptions {
disable 'TypographyFractions','TypographyQuotes'
}
}
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
<?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:
For more information, see http://g.co/androidstudio/suppressing-lint-warnings
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/path
For more information, see http://g.co/androidstudio/suppressing-lint-warnings