Revert "Moving taskbar lifecycle to TouchInteractionService"
This reverts commit e215fb730b.
Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/tests/view?invocationId=I13700009003387451&testResultId=TR89423459137251402, bug https://buganizer.corp.google.com/issues/188755902
Bug: 188755902
Change-Id: I4650136975b60f311499ee6ff5b27ab9a32d23d6
This commit is contained in:
1 parent
bb6f6e5dae
commit
430465a3d5
29 files changed
+981
-947
No files matched your search
@@ -16,6 +16,9 @@
|
||||
|
||||
package com.android.launcher3.taskbar;
|
||||
|
||||
import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_BACK;
|
||||
import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_IME_SWITCH;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
@@ -26,6 +29,7 @@ import com.android.launcher3.views.ActivityContext;
|
||||
public class ImeBarView extends RelativeLayout {
|
||||
|
||||
private ButtonProvider mButtonProvider;
|
||||
private TaskbarController.TaskbarViewCallbacks mControllerCallbacks;
|
||||
private View mImeView;
|
||||
|
||||
public ImeBarView(Context context) {
|
||||
@@ -40,9 +44,12 @@ public class ImeBarView extends RelativeLayout {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
public void init(ButtonProvider buttonProvider) {
|
||||
public void construct(ButtonProvider buttonProvider) {
|
||||
mButtonProvider = buttonProvider;
|
||||
}
|
||||
|
||||
public void init(TaskbarController.TaskbarViewCallbacks taskbarCallbacks) {
|
||||
mControllerCallbacks = taskbarCallbacks;
|
||||
ActivityContext context = getActivityContext();
|
||||
RelativeLayout.LayoutParams imeParams = new RelativeLayout.LayoutParams(
|
||||
context.getDeviceProfile().iconSizePx,
|
||||
@@ -57,16 +64,24 @@ public class ImeBarView extends RelativeLayout {
|
||||
|
||||
// Down Arrow
|
||||
View downView = mButtonProvider.getDown();
|
||||
downView.setOnClickListener(view -> mControllerCallbacks.onNavigationButtonClick(
|
||||
BUTTON_BACK));
|
||||
downView.setLayoutParams(downParams);
|
||||
downView.setRotation(-90);
|
||||
addView(downView);
|
||||
|
||||
// IME switcher button
|
||||
mImeView = mButtonProvider.getImeSwitcher();
|
||||
mImeView.setOnClickListener(view -> mControllerCallbacks.onNavigationButtonClick(
|
||||
BUTTON_IME_SWITCH));
|
||||
mImeView.setLayoutParams(imeParams);
|
||||
addView(mImeView);
|
||||
}
|
||||
|
||||
public void cleanup() {
|
||||
removeAllViews();
|
||||
}
|
||||
|
||||
public void setImeSwitcherVisibility(boolean show) {
|
||||
mImeView.setVisibility(show ? VISIBLE : GONE);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user