1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-30 00:01:19 +00:00

Fix lint issues after build.gradle update (#115)

* Update build.gradle
Remove unused menu resource
Insert constant instead of static string
Obey new wakelock tag naming rule

* Add annotations - importantForAutofill
This commit is contained in:
Catfriend1 2018-10-27 16:21:03 +02:00 committed by GitHub
parent e0bf5589db
commit 6ee9f26fb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 21 additions and 15 deletions

View file

@ -9,7 +9,7 @@ dependencies {
implementation 'com.google.zxing:android-integration:3.3.0' implementation 'com.google.zxing:android-integration:3.3.0'
implementation 'com.google.code.gson:gson:2.8.2' implementation 'com.google.code.gson:gson:2.8.2'
implementation 'org.mindrot:jbcrypt:0.4' implementation 'org.mindrot:jbcrypt:0.4'
implementation 'com.google.guava:guava:23.6-android' implementation 'com.google.guava:guava:24.1-jre'
implementation 'com.annimon:stream:1.1.9' implementation 'com.annimon:stream:1.1.9'
implementation 'com.android.volley:volley:1.1.0' implementation 'com.android.volley:volley:1.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3' implementation 'com.android.support.constraint:constraint-layout:1.1.3'

View file

@ -144,7 +144,13 @@ public class SyncthingRunnable implements Runnable {
Boolean useWakeLock = mPreferences.getBoolean(Constants.PREF_USE_WAKE_LOCK, false); Boolean useWakeLock = mPreferences.getBoolean(Constants.PREF_USE_WAKE_LOCK, false);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M && useWakeLock) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M && useWakeLock) {
pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG); /**
* Since gradle 4.6, wakelock tags have to obey "app:component" naming convention.
*/
wakeLock = pm.newWakeLock(
PowerManager.PARTIAL_WAKE_LOCK,
mContext.getString(R.string.app_name) + ":" + TAG
);
} }
Process process = null; Process process = null;
@ -261,7 +267,7 @@ public class SyncthingRunnable implements Runnable {
} }
private void putCustomEnvironmentVariables(Map<String, String> environment, SharedPreferences sp) { private void putCustomEnvironmentVariables(Map<String, String> environment, SharedPreferences sp) {
String customEnvironment = sp.getString("environment_variables", null); String customEnvironment = sp.getString(Constants.PREF_ENVIRONMENT_VARIABLES, null);
if (TextUtils.isEmpty(customEnvironment)) if (TextUtils.isEmpty(customEnvironment))
return; return;

View file

@ -48,6 +48,7 @@
android:ems="10" android:ems="10"
android:hint="@string/folder_label" android:hint="@string/folder_label"
android:inputType="text|textMultiLine" android:inputType="text|textMultiLine"
android:importantForAutofill="no"
app:layout_constraintBottom_toTopOf="@+id/folders" app:layout_constraintBottom_toTopOf="@+id/folders"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"

View file

@ -62,7 +62,8 @@
android:drawableStart="@drawable/ic_tag_text_outline_black_24dp_active" android:drawableStart="@drawable/ic_tag_text_outline_black_24dp_active"
android:hint="@string/name" android:hint="@string/name"
android:imeOptions="actionNext" android:imeOptions="actionNext"
android:inputType="textCapWords" /> android:inputType="textCapWords"
android:importantForAutofill="no" />
<EditText <EditText
android:id="@+id/addresses" android:id="@+id/addresses"
@ -73,7 +74,8 @@
android:drawableStart="@drawable/ic_link_black_24dp_active" android:drawableStart="@drawable/ic_link_black_24dp_active"
android:hint="@string/addresses" android:hint="@string/addresses"
android:imeOptions="actionDone" android:imeOptions="actionDone"
android:inputType="textNoSuggestions"/> android:inputType="textNoSuggestions"
android:importantForAutofill="no" />
<LinearLayout <LinearLayout
android:id="@+id/compressionContainer" android:id="@+id/compressionContainer"

View file

@ -20,7 +20,7 @@
android:hint="@string/command" android:hint="@string/command"
android:ems="10" android:ems="10"
android:inputType="textPersonName" android:inputType="textPersonName"
/> android:importantForAutofill="no" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -31,7 +31,8 @@
android:drawableStart="@drawable/ic_label_outline_black_24dp" android:drawableStart="@drawable/ic_label_outline_black_24dp"
android:hint="@string/folder_label" android:hint="@string/folder_label"
android:imeOptions="actionDone" android:imeOptions="actionDone"
android:inputType="textCapWords|textNoSuggestions" /> android:inputType="textCapWords|textNoSuggestions"
android:importantForAutofill="no" />
<EditText <EditText
android:id="@+id/id" android:id="@+id/id"
@ -42,7 +43,8 @@
android:drawableStart="@drawable/ic_vpn_key_black_24dp" android:drawableStart="@drawable/ic_vpn_key_black_24dp"
android:hint="@string/folder_id" android:hint="@string/folder_id"
android:imeOptions="actionDone" android:imeOptions="actionDone"
android:inputType="textCapWords" /> android:inputType="textCapWords"
android:importantForAutofill="no" />
<TextView <TextView
android:id="@+id/directoryTextView" android:id="@+id/directoryTextView"
@ -307,7 +309,8 @@
android:layout_marginTop="-20dp" android:layout_marginTop="-20dp"
android:minLines="5" android:minLines="5"
android:maxLines="100" android:maxLines="100"
android:scrollbars="none"/> android:scrollbars="none"
android:importantForAutofill="no"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
</menu>