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

Commit ab21ddb2 authored by Song Chun Fan's avatar Song Chun Fan Committed by Android (Google) Code Review
Browse files

Merge "[Launcher/Archive] remove all checks for the archiving system property" into main

parents b155421a e5ad96ce
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ public class LauncherAppState implements SafeCloseable {
        mOnTerminateCallback.add(() ->
                mContext.getSystemService(LauncherApps.class).unregisterCallback(callbacks));

        if (Utilities.enableSupportForArchiving()) {
        if (Flags.enableSupportForArchiving()) {
            ArchiveCompatibilityParams params = new ArchiveCompatibilityParams();
            params.setEnableUnarchivalConfirmation(false);
            launcherApps.setArchiveCompatibility(params);
+0 −6
Original line number Diff line number Diff line
@@ -830,10 +830,4 @@ public final class Utilities {
                // No-Op
        }
    }

    /** Encapsulates two flag checks into a single one. */
    public static boolean enableSupportForArchiving() {
        return Flags.enableSupportForArchiving()
                || getSystemProperty("pm.archiving.enabled", "false").equals("true");
    }
}
+2 −1
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import androidx.core.util.Pair;

import com.android.launcher3.Flags;
import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.Utilities;
import com.android.launcher3.icons.ComponentWithLabel.ComponentCachingLogic;
@@ -248,7 +249,7 @@ public class IconCache extends BaseIconCache {
    @SuppressWarnings("NewApi")
    public synchronized void getTitleAndIcon(ItemInfoWithIcon info,
            LauncherActivityInfo activityInfo, boolean useLowResIcon) {
        boolean isAppArchived = Utilities.enableSupportForArchiving() && activityInfo != null
        boolean isAppArchived = Flags.enableSupportForArchiving() && activityInfo != null
                && activityInfo.getActivityInfo().isArchived;
        // If we already have activity info, no need to use package icon
        getTitleAndIcon(info, () -> activityInfo, isAppArchived, useLowResIcon,
+2 −1
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.android.launcher3.AppFilter;
import com.android.launcher3.Flags;
import com.android.launcher3.Utilities;
import com.android.launcher3.compat.AlphabeticIndexCompat;
import com.android.launcher3.icons.IconCache;
@@ -330,7 +331,7 @@ public class AllAppsList {
                            PackageManagerHelper.getLoadingProgress(info),
                            PackageInstallInfo.STATUS_INSTALLED_DOWNLOADING);
                    applicationInfo.intent = launchIntent;
                    if (Utilities.enableSupportForArchiving()) {
                    if (Flags.enableSupportForArchiving()) {
                        // In case an app is archived, the respective item flag corresponding to
                        // archiving should also be applied during package updates
                        if (info.getActivityInfo().isArchived) {
+2 −1
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import android.util.Pair;
import androidx.annotation.Nullable;
import androidx.annotation.WorkerThread;

import com.android.launcher3.Flags;
import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAppState;
@@ -300,7 +301,7 @@ public class ItemInstallQueue {
                    } else {
                        lai = laiList.get(0);
                        si.intent = makeLaunchIntent(lai);
                        if (Utilities.enableSupportForArchiving()
                        if (Flags.enableSupportForArchiving()
                                && lai.getActivityInfo().isArchived) {
                            si.runtimeStatusFlags |= FLAG_ARCHIVED;
                        }
Loading