Loading packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +8 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ import android.view.ViewGroup; import android.view.ViewGroup.LayoutParams; import android.view.WindowManager; import android.view.WindowManagerGlobal; import android.view.accessibility.AccessibilityManager; import android.view.animation.AnimationUtils; import android.widget.DateTimeView; import android.widget.ImageView; Loading Loading @@ -161,6 +162,7 @@ public abstract class BaseStatusBar extends SystemUI implements final protected SparseArray<UserInfo> mCurrentProfiles = new SparseArray<UserInfo>(); protected int mLayoutDirection = -1; // invalid protected AccessibilityManager mAccessibilityManager; private Locale mLocale; private float mFontScale; Loading Loading @@ -442,6 +444,9 @@ public abstract class BaseStatusBar extends SystemUI implements mNotificationData = new NotificationData(this); mAccessibilityManager = (AccessibilityManager) mContext.getSystemService(Context.ACCESSIBILITY_SERVICE); mDreamManager = IDreamManager.Stub.asInterface( ServiceManager.checkService(DreamService.DREAM_SERVICE)); mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); Loading Loading @@ -1977,10 +1982,13 @@ public abstract class BaseStatusBar extends SystemUI implements boolean hasTicker = mHeadsUpTicker && !TextUtils.isEmpty(notification.tickerText); boolean isAllowed = notification.extras.getInt(Notification.EXTRA_AS_HEADS_UP, Notification.HEADS_UP_ALLOWED) != Notification.HEADS_UP_NEVER; boolean accessibilityForcesLaunch = isFullscreen && mAccessibilityManager.isTouchExplorationEnabled(); final KeyguardTouchDelegate keyguard = KeyguardTouchDelegate.getInstance(mContext); boolean interrupt = (isFullscreen || (isHighPriority && (isNoisy || hasTicker))) && isAllowed && !accessibilityForcesLaunch && mPowerManager.isScreenOn() && !keyguard.isShowingAndNotOccluded() && !keyguard.isInputRestricted(); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +0 −5 Original line number Diff line number Diff line Loading @@ -1082,7 +1082,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, }; private long mLastLockToAppLongPress; private AccessibilityManager mAccessibilityManager; private View.OnLongClickListener mLongPressBackRecentsListener = new View.OnLongClickListener() { @Override Loading Loading @@ -3874,10 +3873,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, try { boolean sendBackLongPress = false; IActivityManager activityManager = ActivityManagerNative.getDefault(); if (mAccessibilityManager == null) { mAccessibilityManager = (AccessibilityManager) mContext.getSystemService(Context.ACCESSIBILITY_SERVICE); } boolean isAccessiblityEnabled = mAccessibilityManager.isEnabled(); if (activityManager.isInLockTaskMode() && !isAccessiblityEnabled) { long time = System.currentTimeMillis(); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +8 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ import android.view.ViewGroup; import android.view.ViewGroup.LayoutParams; import android.view.WindowManager; import android.view.WindowManagerGlobal; import android.view.accessibility.AccessibilityManager; import android.view.animation.AnimationUtils; import android.widget.DateTimeView; import android.widget.ImageView; Loading Loading @@ -161,6 +162,7 @@ public abstract class BaseStatusBar extends SystemUI implements final protected SparseArray<UserInfo> mCurrentProfiles = new SparseArray<UserInfo>(); protected int mLayoutDirection = -1; // invalid protected AccessibilityManager mAccessibilityManager; private Locale mLocale; private float mFontScale; Loading Loading @@ -442,6 +444,9 @@ public abstract class BaseStatusBar extends SystemUI implements mNotificationData = new NotificationData(this); mAccessibilityManager = (AccessibilityManager) mContext.getSystemService(Context.ACCESSIBILITY_SERVICE); mDreamManager = IDreamManager.Stub.asInterface( ServiceManager.checkService(DreamService.DREAM_SERVICE)); mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); Loading Loading @@ -1977,10 +1982,13 @@ public abstract class BaseStatusBar extends SystemUI implements boolean hasTicker = mHeadsUpTicker && !TextUtils.isEmpty(notification.tickerText); boolean isAllowed = notification.extras.getInt(Notification.EXTRA_AS_HEADS_UP, Notification.HEADS_UP_ALLOWED) != Notification.HEADS_UP_NEVER; boolean accessibilityForcesLaunch = isFullscreen && mAccessibilityManager.isTouchExplorationEnabled(); final KeyguardTouchDelegate keyguard = KeyguardTouchDelegate.getInstance(mContext); boolean interrupt = (isFullscreen || (isHighPriority && (isNoisy || hasTicker))) && isAllowed && !accessibilityForcesLaunch && mPowerManager.isScreenOn() && !keyguard.isShowingAndNotOccluded() && !keyguard.isInputRestricted(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +0 −5 Original line number Diff line number Diff line Loading @@ -1082,7 +1082,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, }; private long mLastLockToAppLongPress; private AccessibilityManager mAccessibilityManager; private View.OnLongClickListener mLongPressBackRecentsListener = new View.OnLongClickListener() { @Override Loading Loading @@ -3874,10 +3873,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, try { boolean sendBackLongPress = false; IActivityManager activityManager = ActivityManagerNative.getDefault(); if (mAccessibilityManager == null) { mAccessibilityManager = (AccessibilityManager) mContext.getSystemService(Context.ACCESSIBILITY_SERVICE); } boolean isAccessiblityEnabled = mAccessibilityManager.isEnabled(); if (activityManager.isInLockTaskMode() && !isAccessiblityEnabled) { long time = System.currentTimeMillis(); Loading