Listening to progress of all apps transition.

This will be used to synchronize keyboard popup. Also setting edittext before disabling to allow plugin to perform some cleanup

Change-Id: Ib9b4ab33d4292fe5d827c37f33c546a9fe6cb002
This commit is contained in:
Alex Mang 2020-05-01 16:47:22 -07:00
parent e6843777b0
commit 5c6b320057
2 changed files with 6 additions and 2 deletions

View File

@ -132,6 +132,10 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil
mAppsView.setTranslationY(shiftCurrent);
if (mPlugin != null) {
mPlugin.setProgress(progress);
}
// Use a light system UI (dark icons) if all apps is behind at least half of the
// status bar.
boolean forceChange = Math.min(shiftCurrent, mScrimView.getVisualTop())
@ -200,8 +204,8 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil
// TODO: change this from toggle event to continuous transition event.
mPlugin.setEditText(mAppsView.getSearchUiManager().setTextSearchEnabled(true));
} else {
mAppsView.getSearchUiManager().setTextSearchEnabled(false);
mPlugin.setEditText(null);
mAppsView.getSearchUiManager().setTextSearchEnabled(false);
}
}

View File

@ -19,7 +19,6 @@ package com.android.systemui.plugins;
import android.app.Activity;
import android.view.ViewGroup;
import android.widget.EditText;
import com.android.systemui.plugins.annotations.ProvidesInterface;
/**
@ -32,4 +31,5 @@ public interface AllAppsSearchPlugin extends Plugin {
void setup(ViewGroup parent, Activity activity);
void setEditText(EditText editText);
void setProgress(float progress);
}