summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Rahul Banerjee <rahulbanerjee@google.com> 2022-10-10 12:46:51 -0700
committer Rahul Banerjee <rahulbanerjee@google.com> 2022-10-10 23:24:19 +0000
commitaaeebdaff933aa4723c550cd9a5d5f54b0207ba9 (patch)
tree67de1f48dbee275d487b1bf7847184463b9261fd
parent6400326c01dd7962c72b1042efe35051950b19a3 (diff)
[DO NOT MERGE] Update onBackPressed() function signature
A follow-up to ag/20093581 (see b/244635782#comment5). Due to a refactor, StatusBarKeyguardViewManager::onBackPressed no longer accepts or returns a boolean. This parent class (and the child in vendor/google_arc) are being updated simultaneously. Note: This is a cherry-pick of ag/20153641 (master -> tm-qpr-dev) Bug: 244635782 Test: Passed presubmit Change-Id: Idd16e938162bf50f528efd3934a116f9fde9d60d
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java15
2 files changed, 5 insertions, 12 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
index 01a92b8bc418..fb84e31c3eed 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
@@ -3328,7 +3328,7 @@ public class CentralSurfacesImpl extends CoreStartable implements
@Override
public boolean onBackPressed() {
if (mStatusBarKeyguardViewManager.canHandleBackPressed()) {
- mStatusBarKeyguardViewManager.onBackPressed(false /* unused */);
+ mStatusBarKeyguardViewManager.onBackPressed();
return true;
}
if (mNotificationPanelViewController.isQsCustomizing()) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
index 6e1cf13d01d7..1b8f0ac7c035 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -203,7 +203,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
if (DEBUG) {
Log.d(TAG, "onBackInvokedCallback() called, invoking onBackPressed()");
}
- onBackPressed(false /* unused */);
+ onBackPressed();
};
private boolean mIsBackCallbackRegistered = false;
@@ -1098,16 +1098,9 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
/**
* Notifies this manager that the back button has been pressed.
*/
- // TODO(b/244635782): This "accept boolean and ignore it, and always return false" was done
- // to make it possible to check this in *and* allow merging to master,
- // where ArcStatusBarKeyguardViewManager inherits this class, and its
- // build will break if we change this interface.
- // So, overall, while this function refactors the behavior of onBackPressed,
- // (it now handles the back press, and no longer returns *whether* it did so)
- // its interface is not changing right now (but will, in a follow-up CL).
- public boolean onBackPressed(boolean ignored) {
+ public void onBackPressed() {
if (!canHandleBackPressed()) {
- return false;
+ return;
}
mCentralSurfaces.endAffordanceLaunch();
@@ -1128,7 +1121,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
mNotificationPanelViewController.expandWithoutQs();
}
}
- return false;
+ return;
}
@Override