Overview
| Correctness | |
| 1 | warning ScrollViewSize: ScrollView size validation |
| 1 | warning
ApplySharedPref: Use apply() on SharedPreferences |
| 1 | warning OldTargetApi: Target SDK attribute is not targeting latest version |
| 3 | warning GradleDependency: Obsolete Gradle Dependency |
| 4 | warning
SpUsage: Using dp instead of sp for text sizes |
| 6 | warning Deprecated: Using deprecated resources |
| Security | |
| 3 | warning HardwareIds: Hardware Id Usage |
| 2 | warning TrustAllX509TrustManager: Insecure TLS/SSL trust manager |
| 1 | warning AllowBackup: AllowBackup/FullBackupContent Problems |
| Performance | |
| 7 | warning ObsoleteLayoutParam: Obsolete layout params |
| 1 | warning StaticFieldLeak: Static Field Leaks |
| 2 | warning
UseCompoundDrawables: Node can be replaced by a TextView with compound drawables |
| 1 | warning InefficientWeight: Inefficient layout weight |
| 13 | warning UnusedResources: Unused resources |
| 1 | warning UselessParent: Useless parent layout |
| 7 | warning UnusedNamespace: Unused namespace |
| Usability:Icons | |
| 19 | warning IconDipSize: Icon density-independent size validation |
| 19 | warning IconDuplicatesConfig: Identical bitmaps across various configurations |
| Usability | |
| 5 | warning
TextFields: Missing inputType or hint |
| Accessibility | |
| 3 | warning
ContentDescription: Image without contentDescription |
| 13 | warning
LabelFor: Missing labelFor attribute |
| Internationalization | |
| 16 | warning SetTextI18n: TextView Internationalization |
| 99 | warning HardcodedText: Hardcoded text |
| Internationalization:Bidirectional Text | |
| 48 | warning RtlSymmetry: Padding and margin symmetry |
| 56 | warning RtlHardcoded: Using left/right instead of start/end attributes |
| Disabled Checks (21) |
ScrollView size validation
../../src/main/res/layout/activity_identity_provider_editor.xml:42:
39 40 <LinearLayout 41 android:layout_width="match_parent" 42 android:layout_height="match_parent" 43 android:layout_alignParentBottom="true" 44 android:layout_alignParentStart="true" 45 android:layout_marginTop="@dimen/activity_vertical_margin"
ScrollViewSize
Correctness
Warning
Priority 7/10
Use apply() on SharedPreferences
../../../mobilesdklibrary/src/main/java/com/microfocus/android/mobile/sdk/library/util/DeviceUtil.java:48:
45 } 46 SharedPreferences.Editor editor = settings.edit(); 47 editor.putString("DEVICE_UUID", uid); 48 editor.commit(); 49 } 50 return uid; 51 }
ApplySharedPref
Correctness
Warning
Priority 6/10
Target SDK attribute is not targeting latest version
../../build.gradle:9:
6 defaultConfig { 7 applicationId "com.microfocus.android.sampleapp.shyanimals" 8 minSdkVersion 23 9 targetSdkVersion 25 10 versionCode 1 11 versionName "1.0" 12 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
OldTargetApi
Correctness
Warning
Priority 6/10
Obsolete Gradle Dependency
../../build.gradle:29:
26 }) 27 compile project(':mobilesdklibrary') 28 compile project(path: ':mobilesdklibrary') 29 compile 'com.android.support:appcompat-v7:25.1.1' 30 compile 'com.android.support:customtabs:25.1.1' 31 compile 'com.android.support:design:25.1.1' 32 testCompile 'junit:junit:4.12'../../build.gradle:30:
27 compile project(':mobilesdklibrary') 28 compile project(path: ':mobilesdklibrary') 29 compile 'com.android.support:appcompat-v7:25.1.1' 30 compile 'com.android.support:customtabs:25.1.1' 31 compile 'com.android.support:design:25.1.1' 32 testCompile 'junit:junit:4.12' 33 }../../build.gradle:31:
28 compile project(path: ':mobilesdklibrary') 29 compile 'com.android.support:appcompat-v7:25.1.1' 30 compile 'com.android.support:customtabs:25.1.1' 31 compile 'com.android.support:design:25.1.1' 32 testCompile 'junit:junit:4.12' 33 }
GradleDependency
Correctness
Warning
Priority 4/10
Using dp instead of sp for text sizes
../../src/main/res/layout/activity_athenticate.xml:12:
9 android:layout_height="wrap_content" 10 android:gravity="center_vertical|center_horizontal" 11 android:textStyle="bold" 12 android:textSize="12dp" 13 android:textColor="#000000" 14 android:layout_marginTop="1dp" 15 android:layout_marginBottom="1dp"../../src/main/res/layout/activity_athenticate.xml:24:
21 android:layout_width="match_parent" 22 android:layout_height="wrap_content" 23 android:gravity="center_vertical|center_horizontal" 24 android:textSize="8dp" 25 android:textColor="#000000" 26 android:layout_marginTop="1dp" 27 android:layout_marginBottom="1dp"../../src/main/res/layout/activity_unauthenticate.xml:12:
9 android:layout_height="wrap_content" 10 android:gravity="center_vertical|center_horizontal" 11 android:textStyle="bold" 12 android:textSize="12dp" 13 android:textColor="#000000" 14 android:layout_marginTop="1dp" 15 android:layout_marginBottom="1dp"../../src/main/res/layout/activity_unauthenticate.xml:24:
21 android:layout_width="match_parent" 22 android:layout_height="wrap_content" 23 android:gravity="center_vertical|center_horizontal" 24 android:textSize="8dp" 25 android:textColor="#000000" 26 android:layout_marginTop="1dp" 27 android:layout_marginBottom="1dp"
SpUsage
Correctness
Warning
Priority 3/10
Using deprecated resources
../../src/main/res/layout/activity_identity_provider_editor.xml:62:
59 android:ems="10" 60 android:hint="https://www.domain.name:port" 61 android:inputType="text" 62 android:singleLine="true" /> 63 64 <TextView 65 android:id="@+id/editClientIdLabel"../../src/main/res/layout/activity_identity_provider_editor.xml:77:
74 android:contentDescription="OAuth2 Client Id" 75 android:ems="10" 76 android:inputType="text" 77 android:singleLine="true" /> 78 79 <TextView 80 android:id="@+id/editClientSecretLabel"../../src/main/res/layout/activity_identity_provider_editor.xml:92:
89 android:contentDescription="OAuth2 Client Secret" 90 android:ems="10" 91 android:inputType="text" 92 android:singleLine="true" /> 93 94 <TextView 95 android:text="Redirect URI:"../../src/main/res/layout/activity_identity_provider_editor.xml:121:
118 android:contentDescription="OAuth2 Scope. Space delimited list." 119 android:ems="10" 120 android:inputType="text" 121 android:singleLine="true" /> 122 123 <TextView 124 android:id="@+id/editDiscoveryURLLabel"../../src/main/res/layout/activity_identity_provider_editor.xml:136:
133 android:contentDescription="OAuth2 Discovery URL. (Root URL not needed)" 134 android:ems="10" 135 android:inputType="text" 136 android:singleLine="true" /> 137 138 <TextView 139 android:id="@+id/editLogoutURLLabel"../../src/main/res/layout/activity_identity_provider_editor.xml:151:
148 android:contentDescription="IDP Logout URL. (Root URL not needed)" 149 android:ems="10" 150 android:inputType="text" 151 android:singleLine="true" /> 152 153 <TextView 154 android:id="@+id/editTokenRevocationURLLabel"
Deprecated
Correctness
Warning
Priority 2/10
Hardware Id Usage
../../../mobilesdklibrary/src/main/java/com/microfocus/android/mobile/sdk/library/util/DeviceUtil.java:37:
34 String uid = settings.getString("DEVICE_UUID", null); 35 36 if (uid == null || uid.isEmpty()) { 37 String aid = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID); 38 if (aid.equals("9774d56d682e549c")) { 39 Log.d("UTILS", "device id is bogus"); 40 }../../../mobilesdklibrary/src/main/java/com/microfocus/android/mobile/sdk/library/util/DeviceUtil.java:62:
59 name.append(android.os.Build.MODEL).append("-"); 60 // if (android.os.Build.DISPLAY != null) 61 // name.append(android.os.Build.DISPLAY).append("-"); 62 if (android.os.Build.SERIAL != null) 63 name.append(android.os.Build.SERIAL); 64 65 if (name.length() == 0)../../../mobilesdklibrary/src/main/java/com/microfocus/android/mobile/sdk/library/util/DeviceUtil.java:63:
60 // if (android.os.Build.DISPLAY != null) 61 // name.append(android.os.Build.DISPLAY).append("-"); 62 if (android.os.Build.SERIAL != null) 63 name.append(android.os.Build.SERIAL); 64 65 if (name.length() == 0) 66 name.append("Unknown");
HardwareIds
Security
Warning
Priority 6/10
Insecure TLS/SSL trust manager
../../src/main/java/com/microfocus/android/sampleapp/shyanimals/MainActivity.java:200:
197 } 198 199 @Override 200 public void checkClientTrusted(X509Certificate[] certs, String authType) { 201 } 202 203 @Override../../src/main/java/com/microfocus/android/sampleapp/shyanimals/MainActivity.java:204:
201 } 202 203 @Override 204 public void checkServerTrusted(X509Certificate[] certs, String authType) { 205 } 206 } 207 };
TrustAllX509TrustManager
Security
Warning
Priority 6/10
AllowBackup/FullBackupContent Problems
../../src/main/AndroidManifest.xml:5:
2 <manifest xmlns:android="http://schemas.android.com/apk/res/android" 3 package="com.microfocus.android.sampleapp.shyanimals"> 4 5 <application 6 android:allowBackup="true" 7 android:icon="@mipmap/ic_launcher" 8 android:label="@string/app_name"
AllowBackup
Security
Warning
Priority 3/10
Obsolete layout params
../../src/main/res/layout/activity_athenticate.xml:16:
13 android:textColor="#000000" 14 android:layout_marginTop="1dp" 15 android:layout_marginBottom="1dp" 16 android:layout_weight="20" 17 android:paddingBottom="3dp" 18 android:layout_alignParentStart="true"/>../../src/main/res/layout/activity_athenticate.xml:28:
25 android:textColor="#000000" 26 android:layout_marginTop="1dp" 27 android:layout_marginBottom="1dp" 28 android:layout_weight="20" 29 android:paddingBottom="5dp" 30 android:layout_below="@+id/authenticate_domain_name"/>../../src/main/res/layout/activity_identity_provider_editor.xml:43:
40 <LinearLayout 41 android:layout_width="match_parent" 42 android:layout_height="match_parent" 43 android:layout_alignParentBottom="true" 44 android:layout_alignParentStart="true" 45 android:layout_marginTop="@dimen/activity_vertical_margin" 46 android:orientation="vertical">../../src/main/res/layout/activity_identity_provider_editor.xml:44:
41 android:layout_width="match_parent" 42 android:layout_height="match_parent" 43 android:layout_alignParentBottom="true" 44 android:layout_alignParentStart="true" 45 android:layout_marginTop="@dimen/activity_vertical_margin" 46 android:orientation="vertical">../../src/main/res/layout/activity_unauthenticate.xml:16:
13 android:textColor="#000000" 14 android:layout_marginTop="1dp" 15 android:layout_marginBottom="1dp" 16 android:layout_weight="20" 17 android:paddingBottom="3dp" 18 android:layout_alignParentStart="true"/>../../src/main/res/layout/activity_unauthenticate.xml:28:
25 android:textColor="#000000" 26 android:layout_marginTop="1dp" 27 android:layout_marginBottom="1dp" 28 android:layout_weight="20" 29 android:paddingBottom="5dp" 30 android:layout_below="@+id/unauthenticate_domain_name"/>../../src/main/res/layout/activity_unauthenticate.xml:38:
35 android:orientation="horizontal" 36 android:layout_width="match_parent" 37 android:layout_height="wrap_content" 38 android:layout_weight="100" 39 android:layout_gravity="left" 40 android:paddingTop="3dp" 41 android:paddingBottom="3dp"
ObsoleteLayoutParam
Performance
Warning
Priority 6/10
Static Field Leaks
../../src/main/java/com/microfocus/android/sampleapp/shyanimals/HintsTask.java:43:
40 41 private static final long HINTS_TASK_PERIOD = 2 * DateTimeUtil.MINUTE_IN_MILLIS; 42 private static long lLastHintsTaskStartTime; 43 private static HintsTask lastHintTask; 44 45 private Context context;
StaticFieldLeak
Performance
Warning
Priority 6/10
Node can be replaced by a TextView with compound drawables
../../src/main/res/layout/content_main.xml:53:
50 android:text="Refresh Token Status:" 51 android:textAppearance="@style/TextAppearance.AppCompat.Widget.Button" /> 52 53 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 54 android:id="@+id/idpstatus_refreshtokenlayout" 55 android:orientation="horizontal" 56 android:layout_width="wrap_content"../../src/main/res/layout/content_main.xml:89:
86 android:paddingTop="10dp" 87 android:textAppearance="@style/TextAppearance.AppCompat.Widget.Button" /> 88 89 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 90 android:id="@+id/idpstatus_accesstokenlayout" 91 android:orientation="horizontal" 92 android:layout_width="wrap_content"
UseCompoundDrawables
Performance
Warning
Priority 6/10
Inefficient layout weight
../../src/main/res/layout/activity_unauthenticate.xml:56:
53 54 <EditText 55 android:id="@+id/unauthenticate_timeout_value" 56 android:layout_width="90dp" 57 android:layout_height="wrap_content" 58 android:ems="10" 59 android:inputType="number"
InefficientWeight
Performance
Warning
Priority 3/10
Unused resources
../../src/main/res/values/colors.xml:6:
../../src/main/res/menu/identity_provider_actions_menu.xml:2:
3 <color name="colorPrimary">#3F51B5</color> 4 <color name="colorPrimaryDark">#303F9F</color> 5 <color name="colorAccent">#3f51b5</color> 6 <color name="colorFailedAuthentication">#FF0000</color> 7 <color name="colorSuccessfulAuthentication">#00FF00</color> 8 </resources>../../src/main/res/values/colors.xml:7:
4 <color name="colorPrimaryDark">#303F9F</color> 5 <color name="colorAccent">#3f51b5</color> 6 <color name="colorFailedAuthentication">#FF0000</color> 7 <color name="colorSuccessfulAuthentication">#00FF00</color> 8 </resources>../../src/main/res/values/dimens.xml:5:
2 <!-- Default screen margins, per the Android Design guidelines. --> 3 <dimen name="activity_horizontal_margin">16dp</dimen> 4 <dimen name="activity_vertical_margin">16dp</dimen> 5 <dimen name="fab_margin">16dp</dimen> 6 </resources>../../src/main/res/drawable-hdpi/ic_row_launch_menu.png:
|
|
|
|
| xhdpi | hdpi | mdpi | xxhdpi |
|---|
1 <?xml version="1.0" encoding="utf-8"?> 2 <menu xmlns:android="http://schemas.android.com/apk/res/android"> 3 4 <item 5 android:id="@+id/identity_provider_unauthenticate"+ 8 More Occurrences...
UnusedResources
Performance
Warning
Priority 3/10
Useless parent layout
../../src/main/res/layout/content_main.xml:16:
13 tools:context="com.microfocus.android.sampleapp.shyanimals.MainActivity" 14 tools:showIn="@layout/activity_main"> 15 16 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 17 xmlns:app="http://schemas.android.com/apk/res-auto" 18 xmlns:tools="http://schemas.android.com/tools" 19 android:id="@+id/idpstatus_toplayout"
UselessParent
Performance
Warning
Priority 2/10
Unused namespace
../../src/main/res/layout/activity_settings.xml:17:
14 android:textAppearance="@style/TextAppearance.AppCompat.Widget.Button" 15 android:text="Refresh Access Token Before Expiration:" /> 16 17 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 18 android:orientation="horizontal" 19 android:layout_width="wrap_content" 20 android:layout_height="wrap_content">../../src/main/res/layout/activity_unauthenticate.xml:33:
30 android:layout_below="@+id/unauthenticate_domain_name"/> 31 32 <LinearLayout 33 xmlns:android="http://schemas.android.com/apk/res/android" 34 android:id="@+id/unauthenticate_timeout_layout" 35 android:orientation="horizontal" 36 android:layout_width="match_parent"../../src/main/res/layout/content_main.xml:16:
13 tools:context="com.microfocus.android.sampleapp.shyanimals.MainActivity" 14 tools:showIn="@layout/activity_main"> 15 16 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 17 xmlns:app="http://schemas.android.com/apk/res-auto" 18 xmlns:tools="http://schemas.android.com/tools" 19 android:id="@+id/idpstatus_toplayout"../../src/main/res/layout/content_main.xml:17:
14 tools:showIn="@layout/activity_main"> 15 16 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 17 xmlns:app="http://schemas.android.com/apk/res-auto" 18 xmlns:tools="http://schemas.android.com/tools" 19 android:id="@+id/idpstatus_toplayout" 20 android:orientation="vertical" android:layout_width="match_parent"../../src/main/res/layout/content_main.xml:18:
15 16 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 17 xmlns:app="http://schemas.android.com/apk/res-auto" 18 xmlns:tools="http://schemas.android.com/tools" 19 android:id="@+id/idpstatus_toplayout" 20 android:orientation="vertical" android:layout_width="match_parent" 21 android:layout_height="match_parent"../../src/main/res/layout/content_main.xml:53:
50 android:text="Refresh Token Status:" 51 android:textAppearance="@style/TextAppearance.AppCompat.Widget.Button" /> 52 53 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 54 android:id="@+id/idpstatus_refreshtokenlayout" 55 android:orientation="horizontal" 56 android:layout_width="wrap_content"../../src/main/res/layout/content_main.xml:89:
86 android:paddingTop="10dp" 87 android:textAppearance="@style/TextAppearance.AppCompat.Widget.Button" /> 88 89 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 90 android:id="@+id/idpstatus_accesstokenlayout" 91 android:orientation="horizontal" 92 android:layout_width="wrap_content"
UnusedNamespace
Performance
Warning
Priority 1/10
Icon density-independent size validation
../../src/main/res/drawable-xxhdpi/ic_animal_ape.png:
../../src/main/res/drawable-xxhdpi/ic_animal_bandicoon.png:
../../src/main/res/drawable-xxhdpi/ic_animal_cat.png:
../../src/main/res/drawable-xxhdpi/ic_animal_dogone.png:
../../src/main/res/drawable-xxhdpi/ic_animal_dogthree.png:
+ 14 More Occurrences...
|
|
|
|
| xhdpi | hdpi | mdpi | xxhdpi |
|---|
|
|
|
|
| xhdpi | hdpi | mdpi | xxhdpi |
|---|
|
|
|
|
| xhdpi | hdpi | mdpi | xxhdpi |
|---|
|
|
|
|
| xhdpi | hdpi | mdpi | xxhdpi |
|---|
|
|
|
|
| xhdpi | hdpi | mdpi | xxhdpi |
|---|
IconDipSize
Icons
Usability
Warning
Priority 5/10
Identical bitmaps across various configurations
../../src/main/res/drawable-xxhdpi/ic_animal_ape.png:
../../src/main/res/drawable-xxhdpi/ic_animal_bandicoon.png:
../../src/main/res/drawable-xxhdpi/ic_animal_cat.png:
../../src/main/res/drawable-xxhdpi/ic_animal_dogone.png:
../../src/main/res/drawable-xxhdpi/ic_animal_dogthree.png:
+ 14 More Occurrences...
|
|
|
|
| xhdpi | hdpi | mdpi | xxhdpi |
|---|
|
|
|
|
| xhdpi | hdpi | mdpi | xxhdpi |
|---|
|
|
|
|
| xhdpi | hdpi | mdpi | xxhdpi |
|---|
|
|
|
|
| xhdpi | hdpi | mdpi | xxhdpi |
|---|
|
|
|
|
| xhdpi | hdpi | mdpi | xxhdpi |
|---|
IconDuplicatesConfig
Icons
Usability
Warning
Priority 5/10
Missing inputType or hint
../../src/main/res/layout/activity_identity_provider_editor.xml:61:
58 android:contentDescription="Ex. http://www.domain.com:8443" 59 android:ems="10" 60 android:hint="https://www.domain.name:port" 61 android:inputType="text" 62 android:singleLine="true" /> 63 64 <TextView
52 android:text="Provider URL:" /> 53 54 <EditText 55 android:id="@+id/editProviderURL" 56 android:layout_width="match_parent" 57 android:layout_height="wrap_content" 58 android:contentDescription="Ex. http://www.domain.com:8443"../../src/main/res/layout/activity_identity_provider_editor.xml:103:
100 <EditText 101 android:layout_width="match_parent" 102 android:layout_height="wrap_content" 103 android:inputType="text" 104 android:ems="10" 105 android:id="@+id/editRedirectUri" 106 android:contentDescription="The Android registered URI for your app." />
102 android:layout_height="wrap_content" 103 android:inputType="text" 104 android:ems="10" 105 android:id="@+id/editRedirectUri" 106 android:contentDescription="The Android registered URI for your app." /> 107 108 <TextView../../src/main/res/layout/activity_identity_provider_editor.xml:135:
132 android:layout_height="wrap_content" 133 android:contentDescription="OAuth2 Discovery URL. (Root URL not needed)" 134 android:ems="10" 135 android:inputType="text" 136 android:singleLine="true" /> 137 138 <TextView
127 android:text="Discovery URL:" /> 128 129 <EditText 130 android:id="@+id/editDiscoveryURL" 131 android:layout_width="match_parent" 132 android:layout_height="wrap_content" 133 android:contentDescription="OAuth2 Discovery URL. (Root URL not needed)"../../src/main/res/layout/activity_identity_provider_editor.xml:150:
147 android:layout_height="wrap_content" 148 android:contentDescription="IDP Logout URL. (Root URL not needed)" 149 android:ems="10" 150 android:inputType="text" 151 android:singleLine="true" /> 152 153 <TextView
142 android:text="Logout URL:" /> 143 144 <EditText 145 android:id="@+id/editLogoutURL" 146 android:layout_width="match_parent" 147 android:layout_height="wrap_content" 148 android:contentDescription="IDP Logout URL. (Root URL not needed)"../../src/main/res/layout/activity_identity_provider_editor.xml:165:
162 android:layout_height="wrap_content" 163 android:contentDescription="IDP Token Revocation URL. (Root URL not needed)" 164 android:ems="10" 165 android:inputType="text" /> 166 167 <TextView 168 android:id="@+id/editTokenRevocationMethodLabel"
157 android:text="Token Revocation URL:" /> 158 159 <EditText 160 android:id="@+id/editTokenRevocationURL" 161 android:layout_width="match_parent" 162 android:layout_height="wrap_content" 163 android:contentDescription="IDP Token Revocation URL. (Root URL not needed)"
TextFields
Usability
Warning
Priority 5/10
Image without contentDescription
../../src/main/res/layout/activity_identity_provider_editor.xml:58:
55 android:id="@+id/editProviderURL" 56 android:layout_width="match_parent" 57 android:layout_height="wrap_content" 58 android:contentDescription="Ex. http://www.domain.com:8443" 59 android:ems="10" 60 android:hint="https://www.domain.name:port" 61 android:inputType="text"../../src/main/res/layout/content_main.xml:59:
56 android:layout_width="wrap_content" 57 android:layout_height="wrap_content"> 58 59 <ImageView 60 android:id="@+id/idpstatus_refreshtoken_image" 61 android:transitionName="refreshtoken" 62 android:layout_width="wrap_content"../../src/main/res/layout/content_main.xml:95:
92 android:layout_width="wrap_content" 93 android:layout_height="wrap_content"> 94 95 <ImageView 96 android:id="@+id/idpstatus_accesstoken_image" 97 android:transitionName="accesstoken" 98 android:layout_width="wrap_content"
ContentDescription
Accessibility
Warning
Priority 3/10
Missing labelFor attribute
../../src/main/res/layout/activity_identity_provider_editor.xml:70:
67 android:layout_height="wrap_content" 68 android:text="Client Id:" /> 69 70 <EditText 71 android:id="@+id/editClientId" 72 android:layout_width="match_parent" 73 android:layout_height="wrap_content"../../src/main/res/layout/activity_identity_provider_editor.xml:85:
82 android:layout_height="wrap_content" 83 android:text="Client Secret:" /> 84 85 <EditText 86 android:id="@+id/editClientSecret" 87 android:layout_width="match_parent" 88 android:layout_height="wrap_content"../../src/main/res/layout/activity_identity_provider_editor.xml:100:
97 android:layout_height="wrap_content" 98 android:id="@+id/editREdirectUriLabel" /> 99 100 <EditText 101 android:layout_width="match_parent" 102 android:layout_height="wrap_content" 103 android:inputType="text"../../src/main/res/layout/activity_identity_provider_editor.xml:114:
111 android:layout_height="wrap_content" 112 android:text="Scope:" /> 113 114 <EditText 115 android:id="@+id/editScope" 116 android:layout_width="match_parent" 117 android:layout_height="wrap_content"../../src/main/res/layout/activity_identity_provider_editor.xml:129:
126 android:layout_height="wrap_content" 127 android:text="Discovery URL:" /> 128 129 <EditText 130 android:id="@+id/editDiscoveryURL" 131 android:layout_width="match_parent" 132 android:layout_height="wrap_content"+ 8 More Occurrences...
LabelFor
Accessibility
Warning
Priority 2/10
TextView Internationalization
../../src/main/java/com/microfocus/android/sampleapp/shyanimals/AuthenticateActivity.java:168:
165 } 166 catch (Exception e) 167 { 168 ((TextView) findViewById(R.id.authenticate_domain_name)).setText("Identity Provider Not Available"); 169 ((TextView) findViewById(R.id.authenticate_client_id)).setText("Error loading Identity Provider"); 170 } 171 }../../src/main/java/com/microfocus/android/sampleapp/shyanimals/AuthenticateActivity.java:169:
166 catch (Exception e) 167 { 168 ((TextView) findViewById(R.id.authenticate_domain_name)).setText("Identity Provider Not Available"); 169 ((TextView) findViewById(R.id.authenticate_client_id)).setText("Error loading Identity Provider"); 170 } 171 }../../src/main/java/com/microfocus/android/sampleapp/shyanimals/AuthenticateReportActivity.java:204:
201 } 202 exceptionMessage = sb.toString(); 203 } 204 childView.setText(" - " + current.getClass().getSimpleName() + ": " + exceptionMessage); 205 childView.setPadding(childView.getPaddingLeft() + 15, childView.getPaddingTop(), childView.getPaddingRight(), childView.getPaddingBottom()); 206 layoutParent.addView(childView, iAddIndex + 1); 207 iCount++;../../src/main/java/com/microfocus/android/sampleapp/shyanimals/MainActivity.java:148:
145 TextView domainNameView = (TextView) findViewById(R.id.idpstatus_domainname); 146 TextView clientIdView = (TextView) findViewById(R.id.idpstatus_clientid); 147 if (null == identityProvider) { 148 domainNameView.setText("No Identity Provider Defined"); 149 clientIdView.setText("Please use the application drop down menu to define an Identity Provider"); 150 findViewById(R.id.idpstatus_refreshtoken_label).setVisibility(View.GONE); 151 findViewById(R.id.idpstatus_accesstoken_label).setVisibility(View.GONE);../../src/main/java/com/microfocus/android/sampleapp/shyanimals/MainActivity.java:149:
146 TextView clientIdView = (TextView) findViewById(R.id.idpstatus_clientid); 147 if (null == identityProvider) { 148 domainNameView.setText("No Identity Provider Defined"); 149 clientIdView.setText("Please use the application drop down menu to define an Identity Provider"); 150 findViewById(R.id.idpstatus_refreshtoken_label).setVisibility(View.GONE); 151 findViewById(R.id.idpstatus_accesstoken_label).setVisibility(View.GONE); 152 findViewById(R.id.idpstatus_refreshtoken_image).setVisibility(View.GONE);+ 11 More Occurrences...
SetTextI18n
Internationalization
Warning
Priority 6/10
Hardcoded text
../../src/main/res/layout/activity_athenticate.xml:93:
90 android:layout_marginTop="20dp" 91 android:layout_marginStart="32dp" 92 android:textSize="22sp" 93 android:text="Browsers" 94 /> 95 </RadioGroup> 96 </RelativeLayout>../../src/main/res/layout/activity_authenticate_report.xml:16:
13 android:layout_width="match_parent" 14 android:layout_height="wrap_content" 15 android:gravity="center_horizontal" 16 android:text="Successful Authentication" 17 android:textAppearance="@style/TextAppearance.AppCompat.Title" 18 android:textIsSelectable="false" />../../src/main/res/layout/activity_authenticate_report.xml:25:
22 android:layout_width="match_parent" 23 android:layout_height="wrap_content" 24 android:gravity="center_horizontal" 25 android:text="Failed Authentication" 26 android:textAppearance="@style/TextAppearance.AppCompat.Title" 27 android:textIsSelectable="false" />../../src/main/res/layout/activity_authenticate_report.xml:34:
31 android:layout_width="match_parent" 32 android:layout_height="wrap_content" 33 android:gravity="center_horizontal" 34 android:text="AaAaAaAaAa" 35 android:textAppearance="@style/TextAppearance.AppCompat.Widget.Button" 36 android:textIsSelectable="false" />../../src/main/res/layout/activity_authenticate_report.xml:43:
40 android:layout_width="match_parent" 41 android:layout_height="wrap_content" 42 android:gravity="center_horizontal" 43 android:text="AaAaAaAaAa" 44 android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small" 45 android:textIsSelectable="false" />+ 94 More Occurrences...
HardcodedText
Internationalization
Warning
Priority 5/10
Padding and margin symmetry
../../src/main/res/layout/activity_authenticate_report.xml:51:
48 android:id="@+id/identityProviderConfigurationLabel" 49 android:layout_width="wrap_content" 50 android:layout_height="wrap_content" 51 android:paddingLeft="3dp" 52 android:paddingBottom="2dp" 53 android:paddingTop="8dp" 54 android:text="Identity Provider Configuration Refresh:"../../src/main/res/layout/activity_authenticate_report.xml:62:
59 android:id="@+id/identityProviderConfigurationInitiated" 60 android:layout_width="wrap_content" 61 android:layout_height="wrap_content" 62 android:paddingLeft="3dp" 63 android:text="Initiated: true" 64 android:textIsSelectable="false" />../../src/main/res/layout/activity_authenticate_report.xml:70:
67 android:id="@+id/identityProviderConfigurationErrors" 68 android:layout_width="wrap_content" 69 android:layout_height="wrap_content" 70 android:paddingLeft="3dp" 71 android:text="Errors:" 72 android:textIsSelectable="false" />../../src/main/res/layout/activity_authenticate_report.xml:80:
77 android:layout_height="wrap_content" 78 android:textAppearance="@style/TextAppearance.AppCompat" 79 android:text="Access Token Refresh:" 80 android:paddingLeft="3dp" 81 android:paddingTop="8dp" 82 android:paddingBottom="2dp" 83 android:textIsSelectable="false" />../../src/main/res/layout/activity_authenticate_report.xml:89:
86 android:id="@+id/accessTokenRefreshInitiated" 87 android:layout_width="wrap_content" 88 android:layout_height="wrap_content" 89 android:paddingLeft="3dp" 90 android:text="Initiated: true" 91 android:textIsSelectable="false" />+ 43 More Occurrences...
RtlSymmetry
Bidirectional Text
Internationalization
Warning
Priority 6/10
Using left/right instead of start/end attributes
../../src/main/res/layout/activity_authenticate_report.xml:51:
48 android:id="@+id/identityProviderConfigurationLabel" 49 android:layout_width="wrap_content" 50 android:layout_height="wrap_content" 51 android:paddingLeft="3dp" 52 android:paddingBottom="2dp" 53 android:paddingTop="8dp" 54 android:text="Identity Provider Configuration Refresh:"../../src/main/res/layout/activity_authenticate_report.xml:62:
59 android:id="@+id/identityProviderConfigurationInitiated" 60 android:layout_width="wrap_content" 61 android:layout_height="wrap_content" 62 android:paddingLeft="3dp" 63 android:text="Initiated: true" 64 android:textIsSelectable="false" />../../src/main/res/layout/activity_authenticate_report.xml:70:
67 android:id="@+id/identityProviderConfigurationErrors" 68 android:layout_width="wrap_content" 69 android:layout_height="wrap_content" 70 android:paddingLeft="3dp" 71 android:text="Errors:" 72 android:textIsSelectable="false" />../../src/main/res/layout/activity_authenticate_report.xml:80:
77 android:layout_height="wrap_content" 78 android:textAppearance="@style/TextAppearance.AppCompat" 79 android:text="Access Token Refresh:" 80 android:paddingLeft="3dp" 81 android:paddingTop="8dp" 82 android:paddingBottom="2dp" 83 android:textIsSelectable="false" />../../src/main/res/layout/activity_authenticate_report.xml:89:
86 android:id="@+id/accessTokenRefreshInitiated" 87 android:layout_width="wrap_content" 88 android:layout_height="wrap_content" 89 android:paddingLeft="3dp" 90 android:text="Initiated: true" 91 android:textIsSelectable="false" />+ 51 More Occurrences...
RtlHardcoded
Bidirectional Text
Internationalization
Warning
Priority 5/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>
<!-- 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" />
</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>
<!-- 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" />
</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 http://g.co/androidstudio/suppressing-lint-warnings















































































