From efb44b71739236a469d97aefb53e8b4179f61e11 Mon Sep 17 00:00:00 2001 From: Peter_Liang Date: Tue, 25 Jan 2022 09:05:23 +0800 Subject: [PATCH 1/3] =?UTF-8?q?New=20feature=20=E2=80=9CText=20and=20readi?= =?UTF-8?q?ng=20options=E2=80=9D=20for=20SetupWizard,=20Wallpaper,=20and?= =?UTF-8?q?=20Settings=20(16/n).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add the entry to "Anything else?" screen 1) Add the new activity-alias tag ".TextReadingForSetupWizardActivity", including the fragment class, action, and targetActivity. 2) Temporarily use the “DISPLAY_SETTINGS” category to trigger “.TextReadingForSetupWizardActivity” to ensure the backward compatibility. 3) Add the text reading settings page entry into SettingsGateway to be successfully launched from SuW. Bug: 211503117 Test: manual test Change-Id: I5c35df3c33c713342a7a0cfad786b7ae48ad941f --- AndroidManifest.xml | 24 ++++++++++++++++++- .../core/gateway/SettingsGateway.java | 2 ++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index bf64ebe7b35..e0119396ff6 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1951,7 +1951,6 @@ android:targetActivity=".accessibility.AccessibilitySettingsForSetupWizardActivity"> - @@ -1961,6 +1960,29 @@ android:value="com.android.settings.accessibility.AccessibilitySettingsForSetupWizard" /> + + + + + + + + + + + + Date: Sat, 29 Jan 2022 00:39:02 +0100 Subject: [PATCH 2/3] Use allowed system value Test: build Change-Id: I84d87024423869515937ab87381be572fed0ba65 Merged-In: I84d87024423869515937ab87381be572fed0ba65 --- .../sound/HandsFreeProfileOutputPreferenceController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/sound/HandsFreeProfileOutputPreferenceController.java b/src/com/android/settings/sound/HandsFreeProfileOutputPreferenceController.java index d9d87375d4f..15f47cf2593 100644 --- a/src/com/android/settings/sound/HandsFreeProfileOutputPreferenceController.java +++ b/src/com/android/settings/sound/HandsFreeProfileOutputPreferenceController.java @@ -16,7 +16,7 @@ package com.android.settings.sound; -import static android.bluetooth.IBluetoothHearingAid.HI_SYNC_ID_INVALID; +import static android.bluetooth.BluetoothHearingAid.HI_SYNC_ID_INVALID; import android.bluetooth.BluetoothDevice; import android.content.Context; From 6de80163b166b1f1456b2d0d56e6231e7da7fab9 Mon Sep 17 00:00:00 2001 From: William Escande Date: Tue, 8 Feb 2022 15:33:16 +0100 Subject: [PATCH 3/3] Resolve bluetooth hidden API usages Bug: 143245666 Test: build Change-Id: Idadf84873c88155382c48bb9108cf28d88aaef0a Merged-In: Idadf84873c88155382c48bb9108cf28d88aaef0a --- .../settings/bluetooth/BluetoothPairingController.java | 2 +- .../android/settings/bluetooth/BluetoothPairingService.java | 4 ++-- .../settings/bluetooth/BluetoothPairingServiceTest.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/android/settings/bluetooth/BluetoothPairingController.java b/src/com/android/settings/bluetooth/BluetoothPairingController.java index b75e02a754a..c70a56ab866 100644 --- a/src/com/android/settings/bluetooth/BluetoothPairingController.java +++ b/src/com/android/settings/bluetooth/BluetoothPairingController.java @@ -435,7 +435,7 @@ public class BluetoothPairingController implements OnCheckedChangeListener, */ public void onCancel() { Log.d(TAG, "Pairing dialog canceled"); - mDevice.cancelPairing(); + mDevice.cancelBondProcess(); } /** diff --git a/src/com/android/settings/bluetooth/BluetoothPairingService.java b/src/com/android/settings/bluetooth/BluetoothPairingService.java index 4c3c9a9be94..a931e681dc2 100644 --- a/src/com/android/settings/bluetooth/BluetoothPairingService.java +++ b/src/com/android/settings/bluetooth/BluetoothPairingService.java @@ -98,7 +98,7 @@ public final class BluetoothPairingService extends Service { } else if (action.equals(ACTION_DISMISS_PAIRING)) { Log.d(TAG, "Notification cancel " + " (" + mDevice.getName() + ")"); - mDevice.cancelPairing(); + mDevice.cancelBondProcess(); } else { int bondState = intent.getIntExtra(BluetoothDevice.EXTRA_BOND_STATE, BluetoothDevice.ERROR); @@ -144,7 +144,7 @@ public final class BluetoothPairingService extends Service { createPairingNotification(intent); } else if (TextUtils.equals(action, ACTION_DISMISS_PAIRING)) { Log.d(TAG, "Notification cancel " + " (" + mDevice.getName() + ")"); - mDevice.cancelPairing(); + mDevice.cancelBondProcess(); mNm.cancel(NOTIFICATION_ID); stopSelf(); } else if (TextUtils.equals(action, ACTION_PAIRING_DIALOG)) { diff --git a/tests/robotests/src/com/android/settings/bluetooth/BluetoothPairingServiceTest.java b/tests/robotests/src/com/android/settings/bluetooth/BluetoothPairingServiceTest.java index e73b447728e..3194e55770f 100644 --- a/tests/robotests/src/com/android/settings/bluetooth/BluetoothPairingServiceTest.java +++ b/tests/robotests/src/com/android/settings/bluetooth/BluetoothPairingServiceTest.java @@ -106,7 +106,7 @@ public class BluetoothPairingServiceTest { mBluetoothPairingService.onStartCommand(intent, /* flags */ 0, /* startId */ 0); - verify(mDevice).cancelPairing(); + verify(mDevice).cancelBondProcess(); verify(mNm).cancel(mBluetoothPairingService.NOTIFICATION_ID); }