1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-23 11:21:29 +00:00

Fixed lint errors

This commit is contained in:
Felix Ableitner 2017-04-11 13:27:10 +09:00
parent 55e707e925
commit 326c187453
2 changed files with 4 additions and 3 deletions

View file

@ -1,11 +1,11 @@
package com.nutomic.syncthingandroid.views; package com.nutomic.syncthingandroid.views;
import android.content.Context; import android.content.Context;
import android.support.v7.widget.AppCompatEditText;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.inputmethod.EditorInfo; import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection; import android.view.inputmethod.InputConnection;
import android.widget.EditText;
import static android.view.inputmethod.EditorInfo.IME_FLAG_NO_ENTER_ACTION; import static android.view.inputmethod.EditorInfo.IME_FLAG_NO_ENTER_ACTION;
@ -18,7 +18,7 @@ import static android.view.inputmethod.EditorInfo.IME_FLAG_NO_ENTER_ACTION;
* of the IME action button with the new line character. This allows rendering soft wraps on single * of the IME action button with the new line character. This allows rendering soft wraps on single
* line input. * line input.
*/ */
public class EnhancedEditText extends EditText { public class EnhancedEditText extends AppCompatEditText {
public EnhancedEditText(Context context) { public EnhancedEditText(Context context) {
super(context); super(context);

View file

@ -109,7 +109,8 @@ public class WifiSsidPreference extends MultiSelectListPreference {
* @return a sorted array of WifiConfiguration, or null, if data cannot be retrieved * @return a sorted array of WifiConfiguration, or null, if data cannot be retrieved
*/ */
private WifiConfiguration[] loadConfiguredNetworksSorted() { private WifiConfiguration[] loadConfiguredNetworksSorted() {
WifiManager wifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); WifiManager wifiManager = (WifiManager)
getContext().getApplicationContext().getSystemService(Context.WIFI_SERVICE);
if (wifiManager != null) { if (wifiManager != null) {
List<WifiConfiguration> configuredNetworks = wifiManager.getConfiguredNetworks(); List<WifiConfiguration> configuredNetworks = wifiManager.getConfiguredNetworks();
// if WiFi is turned off, getConfiguredNetworks returns null on many devices // if WiFi is turned off, getConfiguredNetworks returns null on many devices