Merge "Fix work profile issue" into udc-dev
diff --git a/src/com/android/settings/applications/credentials/DefaultCombinedPicker.java b/src/com/android/settings/applications/credentials/DefaultCombinedPicker.java
index 61cc6e6..b8d104c 100644
--- a/src/com/android/settings/applications/credentials/DefaultCombinedPicker.java
+++ b/src/com/android/settings/applications/credentials/DefaultCombinedPicker.java
@@ -365,13 +365,18 @@
service.getCredentialProviderServices(
getUser(), CredentialManager.PROVIDER_FILTER_USER_PROVIDERS_ONLY)) {
- if (cpi.isEnabled()) {
+ if (cpi.isEnabled() && !cpi.isPrimary()) {
credManProviders.add(cpi.getServiceInfo().getComponentName().flattenToString());
}
}
credManProviders.addAll(primaryCredManProviders);
+ // If there is no provider then clear all the providers.
+ if (TextUtils.isEmpty(autofillProvider) && primaryCredManProviders.isEmpty()) {
+ credManProviders.clear();
+ }
+
service.setEnabledProviders(
primaryCredManProviders,
credManProviders,
diff --git a/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java b/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java
index 208fba7..a18839f 100644
--- a/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java
+++ b/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java
@@ -327,7 +327,7 @@
}
/**
- * Disable the Le Audio profile, VCP, and CSIP for each of the Le Audio devices.
+ * Disable the Le Audio profile for each of the Le Audio devices.
*
* @param profile the LeAudio profile
*/
@@ -336,20 +336,12 @@
Log.e(TAG, "There is no the LE profile or no device in mProfileDeviceMap. Do nothing.");
return;
}
- LocalBluetoothProfile vcp = mProfileManager.getVolumeControlProfile();
- LocalBluetoothProfile csip = mProfileManager.getCsipSetCoordinatorProfile();
for (CachedBluetoothDevice leAudioDevice : mProfileDeviceMap.get(profile.toString())) {
Log.d(TAG,
"device:" + leAudioDevice.getDevice().getAnonymizedAddress()
+ "disable LE profile");
profile.setEnabled(leAudioDevice.getDevice(), false);
- if (vcp != null) {
- vcp.setEnabled(leAudioDevice.getDevice(), false);
- }
- if (csip != null) {
- csip.setEnabled(leAudioDevice.getDevice(), false);
- }
}
if (!SystemProperties.getBoolean(ENABLE_DUAL_MODE_AUDIO, false)) {
@@ -360,7 +352,7 @@
}
/**
- * Enable the Le Audio profile, VCP, and CSIP for each of the Le Audio devices.
+ * Enable the Le Audio profile for each of the Le Audio devices.
*
* @param profile the LeAudio profile
*/
@@ -376,19 +368,11 @@
disableProfileBeforeUserEnablesLeAudio(mProfileManager.getHeadsetProfile());
}
- LocalBluetoothProfile vcp = mProfileManager.getVolumeControlProfile();
- LocalBluetoothProfile csip = mProfileManager.getCsipSetCoordinatorProfile();
for (CachedBluetoothDevice leAudioDevice : mProfileDeviceMap.get(profile.toString())) {
Log.d(TAG,
"device:" + leAudioDevice.getDevice().getAnonymizedAddress()
+ "enable LE profile");
profile.setEnabled(leAudioDevice.getDevice(), true);
- if (vcp != null) {
- vcp.setEnabled(leAudioDevice.getDevice(), true);
- }
- if (csip != null) {
- csip.setEnabled(leAudioDevice.getDevice(), true);
- }
}
}
diff --git a/src/com/android/settings/password/ChooseLockPattern.java b/src/com/android/settings/password/ChooseLockPattern.java
index 707eebf..dc36220 100644
--- a/src/com/android/settings/password/ChooseLockPattern.java
+++ b/src/com/android/settings/password/ChooseLockPattern.java
@@ -798,7 +798,12 @@
// If the stage changed, announce the header for accessibility. This
// is a no-op when accessibility is disabled.
if (previousStage != stage || announceAlways) {
- mHeaderText.announceForAccessibility(mHeaderText.getText());
+ if (stage == Stage.NeedToConfirm) {
+ // If the Stage is NeedToConfirm, move the a11y focus to the header.
+ mHeaderText.requestAccessibilityFocus();
+ } else {
+ mHeaderText.announceForAccessibility(mHeaderText.getText());
+ }
}
}