Merge "[automerger skipped] Merge "Generate ACTION_CANCEL event when screen turned off by proximity sensor." into rvc-dev am: aaec0d4ac3 am: dd3baf3304 am: 58d7dae053 am: 81dfe2bfec -s ours"

This commit is contained in:
Automerger Merge Worker
2020-05-28 19:28:30 +00:00
committed by Android (Google) Code Review
7 changed files with 16 additions and 51 deletions

View File

@@ -188,11 +188,6 @@ public class AppOpsInfo extends LinearLayout implements NotificationGuts.GutsCon
return false;
}
@Override
public boolean needsFalsingProtection() {
return false;
}
@Override
public View getContentView() {
return this;

View File

@@ -403,11 +403,6 @@ public class NotificationConversationInfo extends LinearLayout implements
// TODO: do we need to do anything here?
}
@Override
public boolean needsFalsingProtection() {
return true;
}
@Override
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
super.onInitializeAccessibilityEvent(event);

View File

@@ -104,12 +104,6 @@ public class NotificationGuts extends FrameLayout {
* Called when the guts view has finished its close animation.
*/
default void onFinishedClosing() {}
/**
* Returns whether falsing protection is needed before showing the contents of this
* view on the lockscreen
*/
boolean needsFalsingProtection();
}
public interface OnGutsClosedListener {

View File

@@ -523,27 +523,23 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx
int x,
int y,
NotificationMenuRowPlugin.MenuItem menuItem) {
if (menuItem.getGutsView() instanceof NotificationGuts.GutsContent) {
NotificationGuts.GutsContent gutsView =
(NotificationGuts.GutsContent) menuItem.getGutsView();
if (gutsView.needsFalsingProtection()) {
if (mStatusBarStateController instanceof StatusBarStateControllerImpl) {
((StatusBarStateControllerImpl) mStatusBarStateController)
.setLeaveOpenOnKeyguardHide(true);
}
Runnable r = () -> mMainHandler.post(
() -> openGutsInternal(view, x, y, menuItem));
mStatusBarLazy.get().executeRunnableDismissingKeyguard(
r,
null /* cancelAction */,
false /* dismissShade */,
true /* afterKeyguardGone */,
true /* deferred */);
return true;
if (menuItem.getGutsView() instanceof NotificationInfo) {
if (mStatusBarStateController instanceof StatusBarStateControllerImpl) {
((StatusBarStateControllerImpl) mStatusBarStateController)
.setLeaveOpenOnKeyguardHide(true);
}
Runnable r = () -> mMainHandler.post(
() -> openGutsInternal(view, x, y, menuItem));
mStatusBarLazy.get().executeRunnableDismissingKeyguard(
r,
null /* cancelAction */,
false /* dismissShade */,
true /* afterKeyguardGone */,
true /* deferred */);
return true;
}
return openGutsInternal(view, x, y, menuItem);
}

View File

@@ -489,11 +489,6 @@ public class NotificationInfo extends LinearLayout implements NotificationGuts.G
mMetricsLogger.write(notificationControlsLogMaker().setType(MetricsEvent.TYPE_CLOSE));
}
@Override
public boolean needsFalsingProtection() {
return true;
}
@Override
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
super.onInitializeAccessibilityEvent(event);

View File

@@ -442,11 +442,6 @@ public class NotificationSnooze extends LinearLayout
return true;
}
@Override
public boolean needsFalsingProtection() {
return false;
}
public class NotificationSnoozeOption implements SnoozeOption {
private SnoozeCriterion mCriterion;
private int mMinutesToSnoozeFor;

View File

@@ -300,11 +300,6 @@ public class PartialConversationInfo extends LinearLayout implements
// TODO: do we need to do anything here?
}
@Override
public boolean needsFalsingProtection() {
return true;
}
@Override
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
super.onInitializeAccessibilityEvent(event);