Merge "Add shortcut to install an app to Private space" into main
This commit is contained in:
commit
eb1966c278
9 files changed
+134
-2
No files matched your search
@@ -129,8 +129,10 @@ public class ApiWrapper {
|
||||
public static Intent getAppMarketActivityIntent(Context context, String packageName,
|
||||
UserHandle user) {
|
||||
LauncherApps launcherApps = context.getSystemService(LauncherApps.class);
|
||||
if (android.os.Flags.allowPrivateProfile() && Flags.enablePrivateSpace()
|
||||
&& Flags.privateSpaceAppInstallerButton()) {
|
||||
if (android.os.Flags.allowPrivateProfile()
|
||||
&& Flags.enablePrivateSpace()
|
||||
&& (Flags.privateSpaceAppInstallerButton()
|
||||
|| Flags.enablePrivateSpaceInstallShortcut())) {
|
||||
StartActivityParams params = new StartActivityParams((PendingIntent) null, 0);
|
||||
params.intentSender = launcherApps.getAppMarketActivityIntent(packageName, user);
|
||||
return ProxyActivityStarter.getLaunchIntent(context, params);
|
||||
|
||||
@@ -40,6 +40,7 @@ import static com.android.launcher3.model.data.ItemInfo.NO_MATCHING_ID;
|
||||
import static com.android.launcher3.popup.QuickstepSystemShortcut.getSplitSelectShortcutByPosition;
|
||||
import static com.android.launcher3.popup.SystemShortcut.APP_INFO;
|
||||
import static com.android.launcher3.popup.SystemShortcut.INSTALL;
|
||||
import static com.android.launcher3.popup.SystemShortcut.PRIVATE_PROFILE_INSTALL;
|
||||
import static com.android.launcher3.popup.SystemShortcut.WIDGETS;
|
||||
import static com.android.launcher3.taskbar.LauncherTaskbarUIController.ALL_APPS_PAGE_PROGRESS_INDEX;
|
||||
import static com.android.launcher3.taskbar.LauncherTaskbarUIController.MINUS_ONE_PAGE_PROGRESS_INDEX;
|
||||
@@ -95,6 +96,7 @@ import androidx.annotation.RequiresApi;
|
||||
import com.android.app.viewcapture.SettingsAwareViewCapture;
|
||||
import com.android.launcher3.AbstractFloatingView;
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.Flags;
|
||||
import com.android.launcher3.HomeTransitionController;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherSettings.Favorites;
|
||||
@@ -415,6 +417,10 @@ public class QuickstepLauncher extends Launcher {
|
||||
shortcuts.addAll(getSplitShortcuts());
|
||||
shortcuts.add(WIDGETS);
|
||||
shortcuts.add(INSTALL);
|
||||
|
||||
if (Flags.enablePrivateSpaceInstallShortcut()) {
|
||||
shortcuts.add(PRIVATE_PROFILE_INSTALL);
|
||||
}
|
||||
return shortcuts.stream();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user