Removing unnecessary isBindingItems method from ActivityContext
Bug: 393703968 Flag: EXEMPT refactor Test: Presubmit Change-Id: I06fd1dcc81da5e5502a9fb0751c2701b26fd4621
This commit is contained in:
@@ -229,7 +229,6 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
||||
private boolean mIsDestroyed = false;
|
||||
// The flag to know if the window is excluded from magnification region computation.
|
||||
private boolean mIsExcludeFromMagnificationRegion = false;
|
||||
private boolean mBindingItems = false;
|
||||
private boolean mAddedWindow = false;
|
||||
|
||||
// The bounds of the taskbar items relative to TaskbarDragLayer
|
||||
@@ -894,15 +893,6 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
||||
return mAccessibilityDelegate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBindingItems() {
|
||||
return mBindingItems;
|
||||
}
|
||||
|
||||
public void setBindingItems(boolean bindingItems) {
|
||||
mBindingItems = bindingItems;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDragStart() {
|
||||
setTaskbarWindowFullscreen(true);
|
||||
@@ -2049,8 +2039,6 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
||||
"%s\tmIsUserSetupComplete=%b", prefix, mIsUserSetupComplete));
|
||||
pw.println(String.format(
|
||||
"%s\tmWindowLayoutParams.height=%dpx", prefix, mWindowLayoutParams.height));
|
||||
pw.println(String.format(
|
||||
"%s\tmBindInProgress=%b", prefix, mBindingItems));
|
||||
mControllers.dumpLogs(prefix + "\t", pw);
|
||||
mDeviceProfile.dump(this, prefix, pw);
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ public class TaskbarModelCallbacks implements
|
||||
// Used to defer any UI updates during the SUW unstash animation.
|
||||
private boolean mDeferUpdatesForSUW;
|
||||
private Runnable mDeferredUpdates;
|
||||
private boolean mBindingItems = false;
|
||||
|
||||
public TaskbarModelCallbacks(
|
||||
TaskbarActivityContext context, TaskbarView container) {
|
||||
@@ -74,14 +75,14 @@ public class TaskbarModelCallbacks implements
|
||||
|
||||
@Override
|
||||
public void startBinding() {
|
||||
mContext.setBindingItems(true);
|
||||
mBindingItems = true;
|
||||
mHotseatItems.clear();
|
||||
mPredictedItems = Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finishBindingItems(IntSet pagesBoundFirst) {
|
||||
mContext.setBindingItems(false);
|
||||
mBindingItems = false;
|
||||
commitItemsToUI();
|
||||
}
|
||||
|
||||
@@ -167,7 +168,7 @@ public class TaskbarModelCallbacks implements
|
||||
}
|
||||
|
||||
private void commitItemsToUI() {
|
||||
if (mContext.isBindingItems()) {
|
||||
if (mBindingItems) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -115,11 +115,6 @@ public class TaskbarOverlayContext extends BaseTaskbarContext {
|
||||
return mDragLayer.findViewById(R.id.apps_view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBindingItems() {
|
||||
return mTaskbarContext.isBindingItems();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View.OnClickListener getItemOnClickListener() {
|
||||
return mTaskbarContext.getItemOnClickListener();
|
||||
|
||||
@@ -2948,11 +2948,6 @@ public class Launcher extends StatefulActivity<LauncherState>
|
||||
return mModelCallbacks.getWorkspaceLoading();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBindingItems() {
|
||||
return isWorkspaceLoading();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if a touch interaction is in progress
|
||||
*/
|
||||
|
||||
@@ -57,7 +57,6 @@ import com.android.launcher3.popup.PopupContainerWithArrow;
|
||||
import com.android.launcher3.popup.PopupDataProvider;
|
||||
import com.android.launcher3.touch.ItemClickHandler.ItemClickProxy;
|
||||
import com.android.launcher3.util.ComponentKey;
|
||||
import com.android.launcher3.util.IntSet;
|
||||
import com.android.launcher3.util.PackageUserKey;
|
||||
import com.android.launcher3.util.Preconditions;
|
||||
import com.android.launcher3.util.Themes;
|
||||
@@ -83,7 +82,6 @@ public class SecondaryDisplayLauncher extends BaseActivity
|
||||
private boolean mAppDrawerShown = false;
|
||||
|
||||
private StringCache mStringCache;
|
||||
private boolean mBindingItems = false;
|
||||
private SecondaryDisplayPredictions mSecondaryDisplayPredictions;
|
||||
|
||||
private final int[] mTempXY = new int[2];
|
||||
@@ -260,20 +258,9 @@ public class SecondaryDisplayLauncher extends BaseActivity
|
||||
|
||||
@Override
|
||||
public void startBinding() {
|
||||
mBindingItems = true;
|
||||
mDragController.cancelDrag();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBindingItems() {
|
||||
return mBindingItems;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finishBindingItems(IntSet pagesBoundFirst) {
|
||||
mBindingItems = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindDeepShortcutMap(HashMap<ComponentKey, Integer> deepShortcutMap) {
|
||||
mPopupDataProvider.setDeepShortcutMap(deepShortcutMap);
|
||||
|
||||
@@ -270,11 +270,6 @@ public interface ActivityContext {
|
||||
*/
|
||||
default void applyOverwritesToLogItem(LauncherAtom.ItemInfo.Builder itemInfoBuilder) { }
|
||||
|
||||
/** Returns {@code true} if items are currently being bound within this context. */
|
||||
default boolean isBindingItems() {
|
||||
return false;
|
||||
}
|
||||
|
||||
default View.OnClickListener getItemOnClickListener() {
|
||||
return v -> {
|
||||
// No op.
|
||||
|
||||
Reference in New Issue
Block a user