Collapse caret click and all apps click into one
-> Was separating them for cleanliness, but turns out in portrait the caret is the button, but in landscape it's not. We'll clean all this up later. Change-Id: Icbc185f9183ded685b4a988eacf19cb7583ed8ad
This commit is contained in:
1 parent
07eeb60c47
commit
bf78f3cd41
1 file changed
+5
-19
@@ -2256,9 +2256,8 @@ public class Launcher extends BaseActivity
|
|||||||
if (v instanceof FolderIcon) {
|
if (v instanceof FolderIcon) {
|
||||||
onClickFolderIcon(v);
|
onClickFolderIcon(v);
|
||||||
}
|
}
|
||||||
} else if ((FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && v instanceof PageIndicator)) {
|
} else if ((FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && v instanceof PageIndicator) ||
|
||||||
onClickAllAppsCaret(v);
|
(v == mAllAppsButton && mAllAppsButton != null)) {
|
||||||
} else if (v == mAllAppsButton && mAllAppsButton != null) {
|
|
||||||
onClickAllAppsButton(v);
|
onClickAllAppsButton(v);
|
||||||
} else if (tag instanceof AppInfo) {
|
} else if (tag instanceof AppInfo) {
|
||||||
startAppShortcutOrInfoActivity(v);
|
startAppShortcutOrInfoActivity(v);
|
||||||
@@ -2309,27 +2308,14 @@ public class Launcher extends BaseActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event handler for the "grid" button that appears on the home screen, which
|
* Event handler for the "grid" button or "caret" that appears on the home screen, which
|
||||||
* enters all apps mode.
|
* enters all apps mode. In verticalBarLayout the caret can be seen when all apps is open, and
|
||||||
|
* so in that case reverses the action.
|
||||||
*
|
*
|
||||||
* @param v The view that was clicked.
|
* @param v The view that was clicked.
|
||||||
*/
|
*/
|
||||||
protected void onClickAllAppsButton(View v) {
|
protected void onClickAllAppsButton(View v) {
|
||||||
if (LOGD) Log.d(TAG, "onClickAllAppsButton");
|
if (LOGD) Log.d(TAG, "onClickAllAppsButton");
|
||||||
if (!isAppsViewVisible()) {
|
|
||||||
getUserEventDispatcher().logActionOnControl(Action.Touch.TAP,
|
|
||||||
ControlType.ALL_APPS_BUTTON);
|
|
||||||
showAppsView(true /* animated */, true /* updatePredictedApps */);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Event handler for the swipe up caret
|
|
||||||
*
|
|
||||||
* @param v The view that was clicked.
|
|
||||||
*/
|
|
||||||
protected void onClickAllAppsCaret(View v) {
|
|
||||||
if (LOGD) Log.d(TAG, "onClickAllAppsCaret");
|
|
||||||
if (!isAppsViewVisible()) {
|
if (!isAppsViewVisible()) {
|
||||||
getUserEventDispatcher().logActionOnControl(Action.Touch.TAP,
|
getUserEventDispatcher().logActionOnControl(Action.Touch.TAP,
|
||||||
ControlType.ALL_APPS_BUTTON);
|
ControlType.ALL_APPS_BUTTON);
|
||||||
|
|||||||
Reference in new issue
Block a user