Loading android/app/Android.bp +4 −0 Original line number Diff line number Diff line Loading @@ -329,8 +329,12 @@ android_app { "-Xep:InvalidBlockTag:ERROR", "-Xep:InvalidParam:ERROR", "-Xep:MockNotUsedInProduction:ERROR", "-Xep:NonApiType:ERROR", "-Xep:NonCanonicalType:ERROR", "-Xep:NotJavadoc:ERROR", "-Xep:ReturnAtTheEndOfVoidFunction:ERROR", "-Xep:StringCaseLocaleUsage:ERROR", "-Xep:StringCharset:ERROR", "-Xep:UnusedMethod:ERROR", "-Xep:UnusedVariable:ERROR", "-XepExcludedPaths:.*/srcjars/.*", // Exclude generated files Loading android/app/jni/com_android_bluetooth_gatt.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -2882,7 +2882,7 @@ static int register_com_android_bluetooth_gatt_(JNIEnv* env) { {"onClientCongestion", "(IZ)V", &method_onClientCongestion}, {"getSampleGattDbElement", "()Lcom/android/bluetooth/gatt/GattDbElement;", &method_getSampleGattDbElement}, {"onGetGattDb", "(ILjava/util/ArrayList;)V", &method_onGetGattDb}, {"onGetGattDb", "(ILjava/util/List;)V", &method_onGetGattDb}, {"onClientPhyRead", "(ILjava/lang/String;III)V", &method_onClientPhyRead}, {"onClientPhyUpdate", "(IIII)V", &method_onClientPhyUpdate}, {"onClientConnUpdate", "(IIIII)V", &method_onClientConnUpdate}, Loading android/app/src/com/android/bluetooth/DeviceWorkArounds.java +3 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.bluetooth; import com.google.common.base.Ascii; public final class DeviceWorkArounds { public static final String PCM_CARKIT = "9C:DF:03"; public static final String FORD_SYNC_CARKIT = "00:1E:AE"; Loading @@ -25,6 +27,6 @@ public final class DeviceWorkArounds { public static final String MERCEDES_BENZ_CARKIT = "00:26:e8"; public static boolean addressStartsWith(String bdAddr, String carkitAddr) { return bdAddr.toLowerCase().startsWith(carkitAddr.toLowerCase()); return Ascii.toLowerCase(bdAddr).startsWith(Ascii.toLowerCase(carkitAddr)); } } android/app/src/com/android/bluetooth/SignedLongLong.java +1 −3 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.bluetooth; import com.android.bluetooth.map.BluetoothMapUtils; import java.io.UnsupportedEncodingException; import java.util.Objects; /** Loading @@ -40,11 +39,10 @@ public class SignedLongLong implements Comparable<SignedLongLong> { * * @param value the hex-string * @return the created object * @throws UnsupportedEncodingException if "US-ASCII" charset is not supported, * @throws NullPointerException if the string {@code value} is null, * @throws NumberFormatException if the string {@code value} contains invalid characters. */ public static SignedLongLong fromString(String value) throws UnsupportedEncodingException { public static SignedLongLong fromString(String value) { String lsbStr, msbStr; long msb = 0; Loading android/app/src/com/android/bluetooth/audio_util/MediaBrowserWrapper.java +4 −6 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Handles API calls to a MediaBrowser. Loading @@ -41,7 +42,6 @@ import java.util.List; * callback when it gets the answer from MediaBrowser. */ class MediaBrowserWrapper { private static final String TAG = MediaBrowserWrapper.class.getSimpleName(); /** Loading Loading @@ -86,8 +86,7 @@ class MediaBrowserWrapper { // GetFolderItems also works with a callback, so we need to store all requests made before we // got the results and prevent new subscriptions. private final HashMap<String, ArrayList<GetFolderItemsCallback>> mSubscribedIds = new HashMap<>(); private final Map<String, List<GetFolderItemsCallback>> mSubscribedIds = new HashMap<>(); private final Runnable mDisconnectRunnable = () -> _disconnect(); Loading Loading @@ -328,7 +327,7 @@ class MediaBrowserWrapper { mRunHandler.postDelayed(mTimeoutRunnable, BROWSER_DISCONNECT_TIMEOUT.toMillis()); } private void executeCallbacks(String parentId, ArrayList<ListItem> browsableContent) { private void executeCallbacks(String parentId, List<ListItem> browsableContent) { if (mCallbacksExecuted) { return; } Loading @@ -353,8 +352,7 @@ class MediaBrowserWrapper { @Override public void onChildrenLoaded(String parentId, List<MediaItem> children) { ArrayList<ListItem> browsableContent = new ArrayList<>(); List<ListItem> browsableContent = new ArrayList<>(); for (MediaItem item : children) { if (item.isBrowsable()) { Loading Loading
android/app/Android.bp +4 −0 Original line number Diff line number Diff line Loading @@ -329,8 +329,12 @@ android_app { "-Xep:InvalidBlockTag:ERROR", "-Xep:InvalidParam:ERROR", "-Xep:MockNotUsedInProduction:ERROR", "-Xep:NonApiType:ERROR", "-Xep:NonCanonicalType:ERROR", "-Xep:NotJavadoc:ERROR", "-Xep:ReturnAtTheEndOfVoidFunction:ERROR", "-Xep:StringCaseLocaleUsage:ERROR", "-Xep:StringCharset:ERROR", "-Xep:UnusedMethod:ERROR", "-Xep:UnusedVariable:ERROR", "-XepExcludedPaths:.*/srcjars/.*", // Exclude generated files Loading
android/app/jni/com_android_bluetooth_gatt.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -2882,7 +2882,7 @@ static int register_com_android_bluetooth_gatt_(JNIEnv* env) { {"onClientCongestion", "(IZ)V", &method_onClientCongestion}, {"getSampleGattDbElement", "()Lcom/android/bluetooth/gatt/GattDbElement;", &method_getSampleGattDbElement}, {"onGetGattDb", "(ILjava/util/ArrayList;)V", &method_onGetGattDb}, {"onGetGattDb", "(ILjava/util/List;)V", &method_onGetGattDb}, {"onClientPhyRead", "(ILjava/lang/String;III)V", &method_onClientPhyRead}, {"onClientPhyUpdate", "(IIII)V", &method_onClientPhyUpdate}, {"onClientConnUpdate", "(IIIII)V", &method_onClientConnUpdate}, Loading
android/app/src/com/android/bluetooth/DeviceWorkArounds.java +3 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.bluetooth; import com.google.common.base.Ascii; public final class DeviceWorkArounds { public static final String PCM_CARKIT = "9C:DF:03"; public static final String FORD_SYNC_CARKIT = "00:1E:AE"; Loading @@ -25,6 +27,6 @@ public final class DeviceWorkArounds { public static final String MERCEDES_BENZ_CARKIT = "00:26:e8"; public static boolean addressStartsWith(String bdAddr, String carkitAddr) { return bdAddr.toLowerCase().startsWith(carkitAddr.toLowerCase()); return Ascii.toLowerCase(bdAddr).startsWith(Ascii.toLowerCase(carkitAddr)); } }
android/app/src/com/android/bluetooth/SignedLongLong.java +1 −3 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.bluetooth; import com.android.bluetooth.map.BluetoothMapUtils; import java.io.UnsupportedEncodingException; import java.util.Objects; /** Loading @@ -40,11 +39,10 @@ public class SignedLongLong implements Comparable<SignedLongLong> { * * @param value the hex-string * @return the created object * @throws UnsupportedEncodingException if "US-ASCII" charset is not supported, * @throws NullPointerException if the string {@code value} is null, * @throws NumberFormatException if the string {@code value} contains invalid characters. */ public static SignedLongLong fromString(String value) throws UnsupportedEncodingException { public static SignedLongLong fromString(String value) { String lsbStr, msbStr; long msb = 0; Loading
android/app/src/com/android/bluetooth/audio_util/MediaBrowserWrapper.java +4 −6 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Handles API calls to a MediaBrowser. Loading @@ -41,7 +42,6 @@ import java.util.List; * callback when it gets the answer from MediaBrowser. */ class MediaBrowserWrapper { private static final String TAG = MediaBrowserWrapper.class.getSimpleName(); /** Loading Loading @@ -86,8 +86,7 @@ class MediaBrowserWrapper { // GetFolderItems also works with a callback, so we need to store all requests made before we // got the results and prevent new subscriptions. private final HashMap<String, ArrayList<GetFolderItemsCallback>> mSubscribedIds = new HashMap<>(); private final Map<String, List<GetFolderItemsCallback>> mSubscribedIds = new HashMap<>(); private final Runnable mDisconnectRunnable = () -> _disconnect(); Loading Loading @@ -328,7 +327,7 @@ class MediaBrowserWrapper { mRunHandler.postDelayed(mTimeoutRunnable, BROWSER_DISCONNECT_TIMEOUT.toMillis()); } private void executeCallbacks(String parentId, ArrayList<ListItem> browsableContent) { private void executeCallbacks(String parentId, List<ListItem> browsableContent) { if (mCallbacksExecuted) { return; } Loading @@ -353,8 +352,7 @@ class MediaBrowserWrapper { @Override public void onChildrenLoaded(String parentId, List<MediaItem> children) { ArrayList<ListItem> browsableContent = new ArrayList<>(); List<ListItem> browsableContent = new ArrayList<>(); for (MediaItem item : children) { if (item.isBrowsable()) { Loading