mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-12-23 19:31:30 +00:00
Fixed lint errors
This commit is contained in:
parent
55e707e925
commit
326c187453
2 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue