diff options
4 files changed, 24 insertions, 3 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 6a36c26..b8eb80a 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -16650,6 +16650,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (changed) { requestLayout(); + invalidateOutline(); } } diff --git a/core/java/android/widget/RadialTimePickerView.java b/core/java/android/widget/RadialTimePickerView.java index 7b64cf5..11fda2c 100644 --- a/core/java/android/widget/RadialTimePickerView.java +++ b/core/java/android/widget/RadialTimePickerView.java @@ -1381,11 +1381,19 @@ public class RadialTimePickerView extends View implements View.OnTouchListener { @Override protected int getVirtualViewAt(float x, float y) { final int id; + + // Calling getDegreesXY() has side-effects, so we need to cache the + // current inner circle value and restore after the call. + final boolean wasOnInnerCircle = mIsOnInnerCircle; final int degrees = getDegreesFromXY(x, y); + final boolean isOnInnerCircle = mIsOnInnerCircle; + mIsOnInnerCircle = wasOnInnerCircle; + if (degrees != -1) { final int snapDegrees = snapOnly30s(degrees, 0) % 360; if (mShowHours) { - final int hour = getHourForDegrees(snapDegrees, mIsOnInnerCircle); + final int hour24 = getHourForDegrees(snapDegrees, isOnInnerCircle); + final int hour = mIs24HourMode ? hour24 : hour24To12(hour24); id = makeId(TYPE_HOUR, hour); } else { final int current = getCurrentMinute(); @@ -1514,6 +1522,16 @@ public class RadialTimePickerView extends View implements View.OnTouchListener { return hour24; } + private int hour24To12(int hour24) { + if (hour24 == 0) { + return 12; + } else if (hour24 > 12) { + return hour24 - 12; + } else { + return hour24; + } + } + private void getBoundsForVirtualView(int virtualViewId, Rect bounds) { final float radius; final int type = getTypeFromId(virtualViewId); diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index 6d28382..aefbf60 100755 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java @@ -72,7 +72,7 @@ public final class ActiveServices { static final boolean DEBUG_DELAYED_SERVICE = ActivityManagerService.DEBUG_SERVICE; static final boolean DEBUG_DELAYED_STARTS = DEBUG_DELAYED_SERVICE; static final boolean DEBUG_MU = ActivityManagerService.DEBUG_MU; - static final boolean LOG_SERVICE_START_STOP = true; + static final boolean LOG_SERVICE_START_STOP = false; static final String TAG = ActivityManagerService.TAG; static final String TAG_MU = ActivityManagerService.TAG_MU; diff --git a/services/core/java/com/android/server/tv/TvInputHardwareManager.java b/services/core/java/com/android/server/tv/TvInputHardwareManager.java index 2af56fe..50b2262 100644 --- a/services/core/java/com/android/server/tv/TvInputHardwareManager.java +++ b/services/core/java/com/android/server/tv/TvInputHardwareManager.java @@ -677,7 +677,9 @@ class TvInputHardwareManager implements TvInputHal.Callback { private AudioDevicePort mAudioSource; private List<AudioDevicePort> mAudioSink = new ArrayList<>(); private AudioPatch mAudioPatch = null; - private float mCommittedVolume = 0.0f; + // Set to an invalid value for a volume, so that current volume can be applied at the + // first call to updateAudioConfigLocked(). + private float mCommittedVolume = -1f; private float mSourceVolume = 0.0f; private TvStreamConfig mActiveConfig = null; |
