Loading AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ android:enabled="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.SHOW_WORK_APPS" /> <category android:name="android.intent.category.HOME" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.MONKEY"/> Loading src/com/android/launcher3/Launcher.java +9 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,7 @@ import com.android.launcher3.accessibility.LauncherAccessibilityDelegate; import com.android.launcher3.allapps.ActivityAllAppsContainerView; import com.android.launcher3.allapps.AllAppsStore; import com.android.launcher3.allapps.AllAppsTransitionController; import com.android.launcher3.allapps.BaseAllAppsContainerView; import com.android.launcher3.allapps.DiscoveryBounce; import com.android.launcher3.anim.AnimatorListeners; import com.android.launcher3.anim.PropertyListBuilder; Loading Loading @@ -1567,6 +1568,7 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche boolean isActionMain = Intent.ACTION_MAIN.equals(intent.getAction()); boolean internalStateHandled = ACTIVITY_TRACKER.handleNewIntent(this); hideKeyboard(); if (isActionMain) { if (!internalStateHandled) { // In all these cases, only animate if we're already on home Loading Loading @@ -1595,6 +1597,8 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche handleGestureContract(intent); } else if (Intent.ACTION_ALL_APPS.equals(intent.getAction())) { showAllAppsFromIntent(alreadyOnHome); } else if (Intent.ACTION_SHOW_WORK_APPS.equals(intent.getAction())) { showAllAppsWorkTabFromIntent(alreadyOnHome); } TraceHelper.INSTANCE.endSection(traceToken); Loading @@ -1605,6 +1609,11 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche getStateManager().goToState(ALL_APPS, alreadyOnHome); } private void showAllAppsWorkTabFromIntent(boolean alreadyOnHome) { showAllAppsFromIntent(alreadyOnHome); mAppsView.switchToTab(BaseAllAppsContainerView.AdapterHolder.WORK); } /** * Handles gesture nav contract */ Loading src/com/android/launcher3/allapps/BaseAllAppsContainerView.java +10 −0 Original line number Diff line number Diff line Loading @@ -331,6 +331,16 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte return mViewPager.getNextPage() == 0; } /** * Switches the current page to the provided {@code tab} if tabs are supported, otherwise does * nothing. */ public void switchToTab(int tab) { if (mUsingTabs) { mViewPager.setCurrentPage(tab); } } public LayoutInflater getLayoutInflater() { return LayoutInflater.from(getContext()); } Loading Loading
AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ android:enabled="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.SHOW_WORK_APPS" /> <category android:name="android.intent.category.HOME" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.MONKEY"/> Loading
src/com/android/launcher3/Launcher.java +9 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,7 @@ import com.android.launcher3.accessibility.LauncherAccessibilityDelegate; import com.android.launcher3.allapps.ActivityAllAppsContainerView; import com.android.launcher3.allapps.AllAppsStore; import com.android.launcher3.allapps.AllAppsTransitionController; import com.android.launcher3.allapps.BaseAllAppsContainerView; import com.android.launcher3.allapps.DiscoveryBounce; import com.android.launcher3.anim.AnimatorListeners; import com.android.launcher3.anim.PropertyListBuilder; Loading Loading @@ -1567,6 +1568,7 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche boolean isActionMain = Intent.ACTION_MAIN.equals(intent.getAction()); boolean internalStateHandled = ACTIVITY_TRACKER.handleNewIntent(this); hideKeyboard(); if (isActionMain) { if (!internalStateHandled) { // In all these cases, only animate if we're already on home Loading Loading @@ -1595,6 +1597,8 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche handleGestureContract(intent); } else if (Intent.ACTION_ALL_APPS.equals(intent.getAction())) { showAllAppsFromIntent(alreadyOnHome); } else if (Intent.ACTION_SHOW_WORK_APPS.equals(intent.getAction())) { showAllAppsWorkTabFromIntent(alreadyOnHome); } TraceHelper.INSTANCE.endSection(traceToken); Loading @@ -1605,6 +1609,11 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche getStateManager().goToState(ALL_APPS, alreadyOnHome); } private void showAllAppsWorkTabFromIntent(boolean alreadyOnHome) { showAllAppsFromIntent(alreadyOnHome); mAppsView.switchToTab(BaseAllAppsContainerView.AdapterHolder.WORK); } /** * Handles gesture nav contract */ Loading
src/com/android/launcher3/allapps/BaseAllAppsContainerView.java +10 −0 Original line number Diff line number Diff line Loading @@ -331,6 +331,16 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte return mViewPager.getNextPage() == 0; } /** * Switches the current page to the provided {@code tab} if tabs are supported, otherwise does * nothing. */ public void switchToTab(int tab) { if (mUsingTabs) { mViewPager.setCurrentPage(tab); } } public LayoutInflater getLayoutInflater() { return LayoutInflater.from(getContext()); } Loading