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

Commit 24540298 authored by Anushree Ganjam's avatar Anushree Ganjam
Browse files

Remove Pin Prediction shortcut from private space app.

Before: https://screenshot.googleplex.com/68S4y4efJWQkyYk.png
After: https://screenshot.googleplex.com/8XdwUFGsYvHkEQ4.png

Bug: 319250810
Test: Manual
Flag: aconfig com.android.launcher.enable_delete_private_space_pin_shortcut DEVELOPMENT

Change-Id: I33ef2cc35c31f86101197405502d84ad98b36bdc
parent 1cc90d80
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ import androidx.annotation.VisibleForTesting;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.DragSource;
import com.android.launcher3.DropTarget;
import com.android.launcher3.Flags;
import com.android.launcher3.Hotseat;
import com.android.launcher3.LauncherPrefs;
import com.android.launcher3.LauncherSettings;
@@ -55,6 +56,7 @@ import com.android.launcher3.logging.InstanceId;
import com.android.launcher3.model.BgDataModel.FixedContainerItems;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.pm.UserCache;
import com.android.launcher3.popup.SystemShortcut;
import com.android.launcher3.testing.TestLogging;
import com.android.launcher3.testing.shared.TestProtocol;
@@ -417,6 +419,10 @@ public class HotseatPredictionController implements DragController.DragListener,
        if (itemInfo.container != LauncherSettings.Favorites.CONTAINER_HOTSEAT_PREDICTION) {
            return null;
        }
        if (Flags.enablePrivateSpace() && UserCache.getInstance(
                activity.getApplicationContext()).getUserInfo(itemInfo.user).isPrivate()) {
            return null;
        }
        return new PinPrediction(activity, itemInfo, originalView);
    }