mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-29 15:51:17 +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:
parent
e0bf5589db
commit
6ee9f26fb7
7 changed files with 21 additions and 15 deletions
|
@ -9,7 +9,7 @@ dependencies {
|
|||
implementation 'com.google.zxing:android-integration:3.3.0'
|
||||
implementation 'com.google.code.gson:gson:2.8.2'
|
||||
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.android.volley:volley:1.1.0'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||
|
|
|
@ -144,7 +144,13 @@ public class SyncthingRunnable implements Runnable {
|
|||
Boolean useWakeLock = mPreferences.getBoolean(Constants.PREF_USE_WAKE_LOCK, false);
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M && useWakeLock) {
|
||||
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;
|
||||
|
@ -261,7 +267,7 @@ public class SyncthingRunnable implements Runnable {
|
|||
}
|
||||
|
||||
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))
|
||||
return;
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
android:ems="10"
|
||||
android:hint="@string/folder_label"
|
||||
android:inputType="text|textMultiLine"
|
||||
android:importantForAutofill="no"
|
||||
app:layout_constraintBottom_toTopOf="@+id/folders"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
|
|
|
@ -62,7 +62,8 @@
|
|||
android:drawableStart="@drawable/ic_tag_text_outline_black_24dp_active"
|
||||
android:hint="@string/name"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="textCapWords" />
|
||||
android:inputType="textCapWords"
|
||||
android:importantForAutofill="no" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/addresses"
|
||||
|
@ -73,7 +74,8 @@
|
|||
android:drawableStart="@drawable/ic_link_black_24dp_active"
|
||||
android:hint="@string/addresses"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textNoSuggestions"/>
|
||||
android:inputType="textNoSuggestions"
|
||||
android:importantForAutofill="no" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/compressionContainer"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
android:hint="@string/command"
|
||||
android:ems="10"
|
||||
android:inputType="textPersonName"
|
||||
/>
|
||||
android:importantForAutofill="no" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -31,7 +31,8 @@
|
|||
android:drawableStart="@drawable/ic_label_outline_black_24dp"
|
||||
android:hint="@string/folder_label"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textCapWords|textNoSuggestions" />
|
||||
android:inputType="textCapWords|textNoSuggestions"
|
||||
android:importantForAutofill="no" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/id"
|
||||
|
@ -42,7 +43,8 @@
|
|||
android:drawableStart="@drawable/ic_vpn_key_black_24dp"
|
||||
android:hint="@string/folder_id"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textCapWords" />
|
||||
android:inputType="textCapWords"
|
||||
android:importantForAutofill="no" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/directoryTextView"
|
||||
|
@ -307,7 +309,8 @@
|
|||
android:layout_marginTop="-20dp"
|
||||
android:minLines="5"
|
||||
android:maxLines="100"
|
||||
android:scrollbars="none"/>
|
||||
android:scrollbars="none"
|
||||
android:importantForAutofill="no"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -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>
|
Loading…
Reference in a new issue