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

Commit ed44123c authored by Songchun Fan's avatar Songchun Fan
Browse files

[pm] feature flag is not needed for MATCH_UNINSTALLED_PACKAGES

The behavior of the flag used in API methods such as getPackageInfo will
stay the same. The only change is the installed state which is hidden. No
need to use a feature flag.

This CL is needed for the installed state change CL to proceed.

BUG: 288142708
Test: atest
android.content.pm.cts.PackageManagerTest#testUninstallWithKeepData

Change-Id: I319ad2d948b3c0d58468387b9b5ab4b9b48ad70a
parent 8e4975fa
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -7,10 +7,3 @@ flag {
    bug: "269127435"
}
flag {
    name: "new_match_uninstalled_enabled"
    namespace: "package_manager_service"
    description: "Feature flag for new MATCH_UNINSTALLED_PACKAGES behavior"
    bug: "298681254"
    is_fixed_read_only: true
}
+4 −5
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ import android.os.Debug;
import android.util.DebugUtils;
import android.util.Slog;

import com.android.server.pm.Flags;
import com.android.server.pm.pkg.component.ParsedMainComponent;

/** @hide */
@@ -92,9 +91,9 @@ public class PackageUserStateUtils {
     * {@link PackageManager#MATCH_ARCHIVED_PACKAGES} is requested;
     * <li> If MATCH_ANY_USER is requested, always return true, because the fact that
     * this object exists means that the package must be installed or has data on at least one user;
     * <li> (When feature enabled) If it is not installed but still has data (i.e., it was
     * previously uninstalled with {@link PackageManager#DELETE_KEEP_DATA}), return true if the
     * caller requested {@link PackageManager#MATCH_UNINSTALLED_PACKAGES} or
     * <li> If it is not installed but still has data (i.e., it was previously uninstalled with
     * {@link PackageManager#DELETE_KEEP_DATA}), return true if the caller requested
     * {@link PackageManager#MATCH_UNINSTALLED_PACKAGES} or
     * {@link PackageManager#MATCH_ARCHIVED_PACKAGES};
     * </ul><p>
     */
@@ -113,7 +112,7 @@ public class PackageUserStateUtils {
            } else return matchDataExists;
        } else {
            // not installed
            return matchDataExists && Flags.newMatchUninstalledEnabled() && state.dataExists();
            return matchDataExists && state.dataExists();
        }
    }