summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJessica Wagantall <jwagantall@cyngn.com>2016-04-20 11:33:07 -0700
committerJessica Wagantall <jwagantall@cyngn.com>2016-04-20 11:33:07 -0700
commit303cef4c34e57ac019fe825f24c2fb4fa611ac4e (patch)
tree5f8d1509763390490780d47807db9674e3b167da
parent9878124adb6f4de9dae0d9eb76102e993fc0b9a9 (diff)
parent3cd1905d857913241198f65066e1aa78516192ea (diff)
downloadframeworks_base-303cef4c34e57ac019fe825f24c2fb4fa611ac4e.zip
frameworks_base-303cef4c34e57ac019fe825f24c2fb4fa611ac4e.tar.gz
frameworks_base-303cef4c34e57ac019fe825f24c2fb4fa611ac4e.tar.bz2
Merge tag 'android-6.0.1_r30' into HEAD
Ticket: RM-234 Android 6.0.1 release 30 Change-Id: I1bd7cf4081a12d28dc5da8b53b9124180afaa23d
-rw-r--r--core/java/android/provider/Settings.java12
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java6
-rw-r--r--services/core/java/com/android/server/audio/AudioService.java25
-rw-r--r--services/core/java/com/android/server/fingerprint/FingerprintService.java6
-rw-r--r--services/usage/java/com/android/server/usage/UsageStatsService.java2
5 files changed, 48 insertions, 3 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index f6642d8..5045b1a 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -6445,6 +6445,18 @@ public final class Settings {
public static final String BLUETOOTH_DISABLED_PROFILES = "bluetooth_disabled_profiles";
/**
+ * A semi-colon separated list of Bluetooth interoperability workarounds.
+ * Each entry is a partial Bluetooth device address string and an integer representing
+ * the feature to be disabled, separated by a comma. The integer must correspond
+ * to a interoperability feature as defined in "interop.h" in /system/bt.
+ * <p>
+ * Example: <br/>
+ * "00:11:22,0;01:02:03:04,2"
+ * @hide
+ */
+ public static final String BLUETOOTH_INTEROPERABILITY_LIST = "bluetooth_interoperability_list";
+
+ /**
* The policy for deciding when Wi-Fi should go to sleep (which will in
* turn switch to using the mobile data as an Internet connection).
* <p>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
index ed4880b..0e71bee 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
@@ -474,6 +474,12 @@ public class PhoneStatusBarPolicy implements Callback {
@Override
public void onUserSwitching(int newUserId, IRemoteCallback reply) {
mUserInfoController.reloadUserInfo();
+ if (reply != null) {
+ try {
+ reply.sendResult(null);
+ } catch (RemoteException e) {
+ }
+ }
}
@Override
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index b3b328a..ef2ff62 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -4003,8 +4003,29 @@ public class AudioService extends IAudioService.Stub {
int index;
if (mIsMuted) {
index = 0;
- } else if (((device & AudioSystem.DEVICE_OUT_ALL_A2DP) != 0 && mAvrcpAbsVolSupported)
- || ((device & mFullVolumeDevices) != 0)) {
+ } else if ((device & AudioSystem.DEVICE_OUT_ALL_A2DP) != 0 && mAvrcpAbsVolSupported) {
+ /* Special handling for Bluetooth Absolute Volume scenario
+ * If we send full audio gain, some accessories are too loud even at its lowest
+ * volume. We are not able to enumerate all such accessories, so here is the
+ * workaround from phone side.
+ * For the lowest volume steps 1 and 2, restrict audio gain to 50% and 75%.
+ * For volume step 0, set audio gain to 0 as some accessories won't mute on their end.
+ */
+ int i = (getIndex(device) + 5)/10;
+ if (i == 0) {
+ // 0% for volume 0
+ index = 0;
+ } else if (i == 1) {
+ // 50% for volume 1
+ index = (int)(mIndexMax * 0.5) /10;
+ } else if (i == 2) {
+ // 75% for volume 2
+ index = (int)(mIndexMax * 0.75) /10;
+ } else {
+ // otherwise, full gain
+ index = (mIndexMax + 5)/10;
+ }
+ } else if ((device & mFullVolumeDevices) != 0) {
index = (mIndexMax + 5)/10;
} else {
index = (getIndex(device) + 5)/10;
diff --git a/services/core/java/com/android/server/fingerprint/FingerprintService.java b/services/core/java/com/android/server/fingerprint/FingerprintService.java
index 6612218..429a31f 100644
--- a/services/core/java/com/android/server/fingerprint/FingerprintService.java
+++ b/services/core/java/com/android/server/fingerprint/FingerprintService.java
@@ -1157,6 +1157,12 @@ public class FingerprintService extends SystemService implements IBinder.DeathRe
public void onUserSwitching(int newUserId, IRemoteCallback reply) {
mHandler.obtainMessage(MSG_USER_SWITCHING, newUserId, 0 /* unused */)
.sendToTarget();
+ if (reply != null) {
+ try {
+ reply.sendResult(null);
+ } catch (RemoteException e) {
+ }
+ }
}
@Override
public void onUserSwitchComplete(int newUserId) throws RemoteException {
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java
index b275c2f..583bac2 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsService.java
@@ -219,7 +219,7 @@ public class UsageStatsService extends SystemService implements
Context.DISPLAY_SERVICE);
mPowerManager = getContext().getSystemService(PowerManager.class);
- mDisplayManager.registerDisplayListener(mDisplayListener, mHandler);
+ mDisplayManager.registerDisplayListener(mDisplayListener, null);
synchronized (this) {
updateDisplayLocked();
}