Fix lint issues on Android.
BUG=webrtc:7549 Review-Url: https://codereview.webrtc.org/2853283002 Cr-Commit-Position: refs/heads/master@{#17982}
This commit is contained in:
parent
9c7e56498b
commit
44116a5dc5
@ -11,6 +11,8 @@
|
||||
<issue id="LongLogTag" severity="ignore"/>
|
||||
<issue id="Registered" severity="ignore"/>
|
||||
<issue id="MissingPermission" severity="ignore"/>
|
||||
<issue id="ApplySharedPref" severity="ignore"/>
|
||||
<!-- TODO(sakal): Remove once the lint tool is updated. -->
|
||||
<issue id="CommitPrefEdits" severity="ignore"/>
|
||||
<issue id="UnusedResources" severity="ignore"/>
|
||||
<issue id="IconColors" severity="ignore"/>
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:singleLine="true"
|
||||
android:maxLines="1"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"/>
|
||||
|
||||
@ -74,4 +74,4 @@
|
||||
android:gravity="center"
|
||||
android:text="@string/no_favorites" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@ -10,8 +10,7 @@
|
||||
|
||||
package org.appspot.apprtc;
|
||||
|
||||
import org.appspot.apprtc.util.AppRTCUtils;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.bluetooth.BluetoothHeadset;
|
||||
@ -26,11 +25,10 @@ import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Process;
|
||||
import android.util.Log;
|
||||
|
||||
import org.webrtc.ThreadUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import org.appspot.apprtc.util.AppRTCUtils;
|
||||
import org.webrtc.ThreadUtils;
|
||||
|
||||
/**
|
||||
* AppRTCProximitySensor manages functions related to Bluetoth devices in the
|
||||
@ -409,6 +407,7 @@ public class AppRTCBluetoothManager {
|
||||
}
|
||||
|
||||
/** Logs the state of the local Bluetooth adapter. */
|
||||
@SuppressLint("HardwareIds")
|
||||
protected void logBluetoothAdapterInfo(BluetoothAdapter localAdapter) {
|
||||
Log.d(TAG, "BluetoothAdapter: "
|
||||
+ "enabled=" + localAdapter.isEnabled() + ", "
|
||||
|
||||
@ -14,9 +14,9 @@ import static org.webrtc.NetworkMonitorAutoDetect.ConnectionType;
|
||||
import static org.webrtc.NetworkMonitorAutoDetect.INVALID_NET_ID;
|
||||
import static org.webrtc.NetworkMonitorAutoDetect.NetworkInformation;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -37,7 +37,9 @@ public class NetworkMonitor {
|
||||
}
|
||||
|
||||
private static final String TAG = "NetworkMonitor";
|
||||
private static NetworkMonitor instance;
|
||||
|
||||
// We are storing application context so it is okay.
|
||||
@SuppressLint("StaticFieldLeak") private static NetworkMonitor instance;
|
||||
|
||||
private final Context applicationContext;
|
||||
|
||||
@ -53,8 +55,7 @@ public class NetworkMonitor {
|
||||
|
||||
private NetworkMonitor(Context context) {
|
||||
assertIsTrue(context != null);
|
||||
applicationContext =
|
||||
context.getApplicationContext() == null ? context : context.getApplicationContext();
|
||||
applicationContext = context.getApplicationContext();
|
||||
|
||||
nativeNetworkObservers = new ArrayList<Long>();
|
||||
networkObservers = new ArrayList<NetworkObserver>();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user