Merge "Improved the heads up logic to launch fullscreen intents less" into nyc-dev
This commit is contained in:
@@ -2080,8 +2080,25 @@ public abstract class BaseStatusBar extends SystemUI implements
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isSnoozedPackage(sbn)) {
|
boolean inUse = mPowerManager.isScreenOn()
|
||||||
if (DEBUG) Log.d(TAG, "No peeking: snoozed package: " + sbn.getKey());
|
&& (!mStatusBarKeyguardViewManager.isShowing()
|
||||||
|
|| mStatusBarKeyguardViewManager.isOccluded())
|
||||||
|
&& !mStatusBarKeyguardViewManager.isInputRestricted();
|
||||||
|
try {
|
||||||
|
inUse = inUse && !mDreamManager.isDreaming();
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
Log.d(TAG, "failed to query dream manager", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!inUse) {
|
||||||
|
if (DEBUG) {
|
||||||
|
Log.d(TAG, "No peeking: not in use: " + sbn.getKey());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mNotificationData.shouldSuppressScreenOn(sbn.getKey())) {
|
||||||
|
if (DEBUG) Log.d(TAG, "No peeking: suppressed by DND: " + sbn.getKey());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2090,15 +2107,17 @@ public abstract class BaseStatusBar extends SystemUI implements
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sbn.getNotification().fullScreenIntent != null
|
if (sbn.getNotification().fullScreenIntent != null) {
|
||||||
&& mAccessibilityManager.isTouchExplorationEnabled()) {
|
if (mAccessibilityManager.isTouchExplorationEnabled()) {
|
||||||
if (DEBUG) Log.d(TAG, "No peeking: accessible fullscreen: " + sbn.getKey());
|
if (DEBUG) Log.d(TAG, "No peeking: accessible fullscreen: " + sbn.getKey());
|
||||||
return false;
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isSnoozedPackage(sbn)) {
|
||||||
if (mNotificationData.shouldSuppressScreenOn(sbn.getKey())) {
|
if (DEBUG) Log.d(TAG, "No peeking: snoozed package: " + sbn.getKey());
|
||||||
if (DEBUG) Log.d(TAG, "No peeking: suppressed by DND: " + sbn.getKey());
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2107,17 +2126,7 @@ public abstract class BaseStatusBar extends SystemUI implements
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean inUse = mPowerManager.isScreenOn()
|
return true;
|
||||||
&& (!mStatusBarKeyguardViewManager.isShowing()
|
|
||||||
|| mStatusBarKeyguardViewManager.isOccluded())
|
|
||||||
&& !mStatusBarKeyguardViewManager.isInputRestricted();
|
|
||||||
try {
|
|
||||||
inUse = inUse && !mDreamManager.isDreaming();
|
|
||||||
} catch (RemoteException e) {
|
|
||||||
Log.d(TAG, "failed to query dream manager", e);
|
|
||||||
}
|
|
||||||
if (DEBUG) Log.d(TAG, "peek if device in use: " + inUse);
|
|
||||||
return inUse;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract boolean isSnoozedPackage(StatusBarNotification sbn);
|
protected abstract boolean isSnoozedPackage(StatusBarNotification sbn);
|
||||||
|
|||||||
Reference in New Issue
Block a user