diff options
author | Dan Sandler <dsandler@android.com> | 2015-10-20 16:01:27 -0700 |
---|---|---|
committer | The Android Automerger <android-build@google.com> | 2015-10-27 15:22:30 -0700 |
commit | bde42b56b84fb2f184f83f2a00fb00a1bd4db22e (patch) | |
tree | a388b3bc8b09e9e65c2bfcde902e284e816a6fed | |
parent | 0ddfa0e90075039dfee500accb308a089d1c71ea (diff) | |
download | base-marshmallow-cts-release.tar.gz |
Delay hiding the cast icon for 3 seconds. DO NOT MERGEandroid-cts-6.0_r9android-cts-6.0_r8android-cts-6.0_r7android-cts-6.0_r6android-cts-6.0_r5android-cts-6.0_r4android-cts-6.0_r32android-cts-6.0_r31android-cts-6.0_r30android-cts-6.0_r3android-cts-6.0_r29android-cts-6.0_r28android-cts-6.0_r27android-cts-6.0_r26android-cts-6.0_r25android-cts-6.0_r24android-cts-6.0_r23android-cts-6.0_r22android-cts-6.0_r21android-cts-6.0_r20android-cts-6.0_r19android-cts-6.0_r18android-cts-6.0_r17android-cts-6.0_r16android-cts-6.0_r15android-cts-6.0_r14android-cts-6.0_r13android-cts-6.0_r12android-6.0.0_r7afw-test-harness-1.5marshmallow-releasemarshmallow-cts-release
Ensure that the user has had a chance to see it for a few
seconds after screen recording has ended.
Bug: 19121797
Change-Id: I52b69b2029439d42163ead5dc8748889b4f61934
(cherry picked from commit 8fd25bf7711aabffe73213ba1f9056f285270695)
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java | 16 |
1 files changed, 15 insertions, 1 deletions
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 540b9d003a17..fa9c4bbcb485 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java @@ -109,6 +109,14 @@ public class PhoneStatusBarPolicy implements Callback { } }; + private Runnable mRemoveCastIconRunnable = new Runnable() { + @Override + public void run() { + if (DEBUG) Log.v(TAG, "updateCast: hiding icon NOW"); + mService.setIconVisibility(SLOT_CAST, false); + } + }; + public PhoneStatusBarPolicy(Context context, CastController cast, HotspotController hotspot, UserInfoController userInfoController, BluetoothController bluetooth) { mContext = context; @@ -328,11 +336,17 @@ public class PhoneStatusBarPolicy implements Callback { } } if (DEBUG) Log.v(TAG, "updateCast: isCasting: " + isCasting); + mHandler.removeCallbacks(mRemoveCastIconRunnable); if (isCasting) { mService.setIcon(SLOT_CAST, R.drawable.stat_sys_cast, 0, mContext.getString(R.string.accessibility_casting)); + mService.setIconVisibility(SLOT_CAST, true); + } else { + // don't turn off the screen-record icon for a few seconds, just to make sure the user + // has seen it + if (DEBUG) Log.v(TAG, "updateCast: hiding icon in 3 sec..."); + mHandler.postDelayed(mRemoveCastIconRunnable, 3000); } - mService.setIconVisibility(SLOT_CAST, isCasting); } private void profileChanged(int userId) { |