Check before the user is unlocked before handling proxied events
Bug: 130272454 Test: None, just checking for null state Change-Id: I6b5a5c0dc7a0dbd8d2d75decd4e7d7ddf6cc3e3d
This commit is contained in:
parent
731242ee66
commit
43b758c454
|
@ -135,6 +135,12 @@ public class TouchInteractionService extends Service implements
|
|||
|
||||
@Override
|
||||
public void onAssistantVisibilityChanged(float visibility) {
|
||||
if (mOverviewComponentObserver == null) {
|
||||
// Save the visibility to be applied when the user is unlocked
|
||||
mPendingAssistantVisibility = visibility;
|
||||
return;
|
||||
}
|
||||
|
||||
MAIN_THREAD_EXECUTOR.execute(() -> {
|
||||
mOverviewComponentObserver.getActivityControlHelper()
|
||||
.onAssistantVisibilityChanged(visibility);
|
||||
|
@ -143,6 +149,10 @@ public class TouchInteractionService extends Service implements
|
|||
|
||||
public void onBackAction(boolean completed, int downX, int downY, boolean isButton,
|
||||
boolean gestureSwipeLeft) {
|
||||
if (mOverviewComponentObserver == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
final ActivityControlHelper activityControl =
|
||||
mOverviewComponentObserver.getActivityControlHelper();
|
||||
UserEventDispatcher.newInstance(getBaseContext()).logActionBack(completed, downX, downY,
|
||||
|
@ -185,6 +195,7 @@ public class TouchInteractionService extends Service implements
|
|||
private InputConsumerController mInputConsumer;
|
||||
private SwipeSharedState mSwipeSharedState;
|
||||
private boolean mAssistantAvailable;
|
||||
private float mPendingAssistantVisibility = 0;
|
||||
|
||||
private boolean mIsUserUnlocked;
|
||||
private List<Runnable> mOnUserUnlockedCallbacks;
|
||||
|
@ -337,6 +348,8 @@ public class TouchInteractionService extends Service implements
|
|||
mAM = ActivityManagerWrapper.getInstance();
|
||||
mRecentsModel = RecentsModel.INSTANCE.get(this);
|
||||
mOverviewComponentObserver = new OverviewComponentObserver(this);
|
||||
mOverviewComponentObserver.getActivityControlHelper().onAssistantVisibilityChanged(
|
||||
mPendingAssistantVisibility);
|
||||
|
||||
mOverviewCommandHelper = new OverviewCommandHelper(this, mOverviewComponentObserver);
|
||||
mOverviewInteractionState = OverviewInteractionState.INSTANCE.get(this);
|
||||
|
|
Loading…
Reference in New Issue