Loading Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ java_defaults { "-Xep:DirectInvocationOnMock:ERROR", "-Xep:EmptyBlockTag:ERROR", "-Xep:EmptyCatch:ERROR", "-Xep:EnumOrdinal:ERROR", "-Xep:EqualsGetClass:ERROR", "-Xep:EqualsHashCode:ERROR", "-Xep:EqualsIncompatibleType:ERROR", Loading android/app/src/com/android/bluetooth/map/BluetoothMapContentObserver.java +3 −0 Original line number Diff line number Diff line Loading @@ -3352,6 +3352,7 @@ public class BluetoothMapContentObserver { return handle; } @SuppressWarnings("EnumOrdinal") // remove entire usage of internal intent public long sendMmsMessage( String folder, String[] toAddress, Loading Loading @@ -4090,6 +4091,7 @@ public class BluetoothMapContentObserver { } } @SuppressWarnings("EnumOrdinal") // remove entire usage of internal intent public static void actionMessageSentDisconnected(Context context, Intent intent, int result) { TYPE type = TYPE.fromOrdinal( Loading Loading @@ -4277,6 +4279,7 @@ public class BluetoothMapContentObserver { } } @SuppressWarnings("EnumOrdinal") // remove entire usage of internal intent public boolean handleSmsSendIntent(Context context, Intent intent) { TYPE type = TYPE.fromOrdinal( Loading android/app/src/com/android/bluetooth/tbs/TbsGatt.java +2 −1 Original line number Diff line number Diff line Loading @@ -1036,6 +1036,7 @@ public class TbsGatt { return mTbsService.getDeviceAuthorization(device); } @SuppressWarnings("EnumOrdinal") private void onRejectedAuthorizationGattOperation(BluetoothDevice device, GattOpContext op) { UUID charUuid = (op.mCharacteristic != null Loading Loading @@ -1102,7 +1103,7 @@ public class TbsGatt { boolean allowToReadRealValue = false; byte[] buffer = null; /* Allow only some informations to be disclosed at this stage. */ /* Allow only some information to be disclosed at this stage. */ if (charUuid.equals(UUID_BEARER_PROVIDER_NAME)) { ByteBuffer bb = ByteBuffer.allocate(0).order(ByteOrder.LITTLE_ENDIAN); bb.put("".getBytes()); Loading android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapContentObserverTest.java +2 −6 Original line number Diff line number Diff line Loading @@ -2156,9 +2156,7 @@ public class BluetoothMapContentObserverTest { // This mock sets type to MMS doReturn(4) .when(mIntent) .getIntExtra( BluetoothMapContentObserver.EXTRA_MESSAGE_SENT_MSG_TYPE, TYPE.NONE.ordinal()); .getIntExtra(eq(BluetoothMapContentObserver.EXTRA_MESSAGE_SENT_MSG_TYPE), anyInt()); mObserver.actionMessageSentDisconnected(mContext, mIntent, 1); Loading @@ -2177,9 +2175,7 @@ public class BluetoothMapContentObserverTest { // This mock sets type to Email doReturn(1) .when(mIntent) .getIntExtra( BluetoothMapContentObserver.EXTRA_MESSAGE_SENT_MSG_TYPE, TYPE.NONE.ordinal()); .getIntExtra(eq(BluetoothMapContentObserver.EXTRA_MESSAGE_SENT_MSG_TYPE), anyInt()); clearInvocations(mContext); mObserver.actionMessageSentDisconnected(mContext, mIntent, Activity.RESULT_FIRST_USER); Loading Loading
Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ java_defaults { "-Xep:DirectInvocationOnMock:ERROR", "-Xep:EmptyBlockTag:ERROR", "-Xep:EmptyCatch:ERROR", "-Xep:EnumOrdinal:ERROR", "-Xep:EqualsGetClass:ERROR", "-Xep:EqualsHashCode:ERROR", "-Xep:EqualsIncompatibleType:ERROR", Loading
android/app/src/com/android/bluetooth/map/BluetoothMapContentObserver.java +3 −0 Original line number Diff line number Diff line Loading @@ -3352,6 +3352,7 @@ public class BluetoothMapContentObserver { return handle; } @SuppressWarnings("EnumOrdinal") // remove entire usage of internal intent public long sendMmsMessage( String folder, String[] toAddress, Loading Loading @@ -4090,6 +4091,7 @@ public class BluetoothMapContentObserver { } } @SuppressWarnings("EnumOrdinal") // remove entire usage of internal intent public static void actionMessageSentDisconnected(Context context, Intent intent, int result) { TYPE type = TYPE.fromOrdinal( Loading Loading @@ -4277,6 +4279,7 @@ public class BluetoothMapContentObserver { } } @SuppressWarnings("EnumOrdinal") // remove entire usage of internal intent public boolean handleSmsSendIntent(Context context, Intent intent) { TYPE type = TYPE.fromOrdinal( Loading
android/app/src/com/android/bluetooth/tbs/TbsGatt.java +2 −1 Original line number Diff line number Diff line Loading @@ -1036,6 +1036,7 @@ public class TbsGatt { return mTbsService.getDeviceAuthorization(device); } @SuppressWarnings("EnumOrdinal") private void onRejectedAuthorizationGattOperation(BluetoothDevice device, GattOpContext op) { UUID charUuid = (op.mCharacteristic != null Loading Loading @@ -1102,7 +1103,7 @@ public class TbsGatt { boolean allowToReadRealValue = false; byte[] buffer = null; /* Allow only some informations to be disclosed at this stage. */ /* Allow only some information to be disclosed at this stage. */ if (charUuid.equals(UUID_BEARER_PROVIDER_NAME)) { ByteBuffer bb = ByteBuffer.allocate(0).order(ByteOrder.LITTLE_ENDIAN); bb.put("".getBytes()); Loading
android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapContentObserverTest.java +2 −6 Original line number Diff line number Diff line Loading @@ -2156,9 +2156,7 @@ public class BluetoothMapContentObserverTest { // This mock sets type to MMS doReturn(4) .when(mIntent) .getIntExtra( BluetoothMapContentObserver.EXTRA_MESSAGE_SENT_MSG_TYPE, TYPE.NONE.ordinal()); .getIntExtra(eq(BluetoothMapContentObserver.EXTRA_MESSAGE_SENT_MSG_TYPE), anyInt()); mObserver.actionMessageSentDisconnected(mContext, mIntent, 1); Loading @@ -2177,9 +2175,7 @@ public class BluetoothMapContentObserverTest { // This mock sets type to Email doReturn(1) .when(mIntent) .getIntExtra( BluetoothMapContentObserver.EXTRA_MESSAGE_SENT_MSG_TYPE, TYPE.NONE.ordinal()); .getIntExtra(eq(BluetoothMapContentObserver.EXTRA_MESSAGE_SENT_MSG_TYPE), anyInt()); clearInvocations(mContext); mObserver.actionMessageSentDisconnected(mContext, mIntent, Activity.RESULT_FIRST_USER); Loading