Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5569676 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topic "am-cfb119a9-e136-408a-8dd7-0b690e3a6793" into ub-launcher3-master

* changes:
  [automerger] Prerequisites for TAPL am: 74c261c8
  Prerequisites for TAPL
parents 67016b4d 0c68860a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -149,4 +149,5 @@
    <integer name="config_recentsMaxThumbnailCacheSize">6</integer>
    <integer name="config_recentsMaxIconCacheSize">12</integer>

    <item name="workspace_page_container" type="id" />
</resources>
+8 −0
Original line number Diff line number Diff line
@@ -2328,6 +2328,8 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
        if (isInState(NORMAL)) {
            shortcutInfos.add(new KeyboardShortcutInfo(getString(R.string.all_apps_button_label),
                    KeyEvent.KEYCODE_A, KeyEvent.META_CTRL_ON));
            shortcutInfos.add(new KeyboardShortcutInfo(getString(R.string.widget_button_text),
                    KeyEvent.KEYCODE_W, KeyEvent.META_CTRL_ON));
        }
        final View currentFocus = getCurrentFocus();
        if (currentFocus != null) {
@@ -2376,6 +2378,12 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
                        return true;
                    }
                    break;
                case KeyEvent.KEYCODE_W:
                    if (isInState(NORMAL)) {
                        OptionsPopupView.openWidgets(this);
                        return true;
                    }
                    break;
            }
        }
        return super.onKeyShortcut(keyCode, event);
+1 −0
Original line number Diff line number Diff line
@@ -547,6 +547,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
        // created CellLayout.
        CellLayout newScreen = (CellLayout) LayoutInflater.from(getContext()).inflate(
                        R.layout.workspace_screen, this, false /* attachToRoot */);
        newScreen.getShortcutsAndWidgets().setId(R.id.workspace_page_container);
        int paddingLeftRight = mLauncher.getDeviceProfile().cellLayoutPaddingLeftRightPx;
        int paddingBottom = mLauncher.getDeviceProfile().cellLayoutBottomPaddingPx;
        newScreen.setPadding(paddingLeftRight, 0, paddingLeftRight, paddingBottom);
+4 −1
Original line number Diff line number Diff line
@@ -153,7 +153,10 @@ public class OptionsPopupView extends ArrowPopup
    }

    public static boolean onWidgetsClicked(View view) {
        Launcher launcher = Launcher.getLauncher(view.getContext());
        return openWidgets(Launcher.getLauncher(view.getContext()));
    }

    public static boolean openWidgets(Launcher launcher) {
        if (launcher.getPackageManager().isSafeMode()) {
            Toast.makeText(launcher, R.string.safemode_widget_error, Toast.LENGTH_SHORT).show();
            return false;