Merge "Retiring some feature flags" into ub-launcher3-master

This commit is contained in:
TreeHugger Robot
2018-08-02 21:48:54 +00:00
committed by Android (Google) Code Review
27 changed files with 41 additions and 215 deletions

View File

@@ -2021,22 +2021,8 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
}
public void onNoCellFound(View dropTargetLayout) {
if (mLauncher.isHotseatLayout(dropTargetLayout)) {
Hotseat hotseat = mLauncher.getHotseat();
boolean droppedOnAllAppsIcon = !FeatureFlags.NO_ALL_APPS_ICON
&& mTargetCell != null && !mLauncher.getDeviceProfile().inv.isAllAppsButtonRank(
hotseat.getOrderInHotseat(mTargetCell[0], mTargetCell[1]));
if (!droppedOnAllAppsIcon) {
// Only show message when hotseat is full and drop target was not AllApps button
showOutOfSpaceMessage(true);
}
} else {
showOutOfSpaceMessage(false);
}
}
private void showOutOfSpaceMessage(boolean isHotseatLayout) {
int strId = (isHotseatLayout ? R.string.hotseat_out_of_space : R.string.out_of_space);
int strId = mLauncher.isHotseatLayout(dropTargetLayout)
? R.string.hotseat_out_of_space : R.string.out_of_space;
Toast.makeText(mLauncher, mLauncher.getString(strId), Toast.LENGTH_SHORT).show();
}