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

Commit 52ca1a63 authored by Song Chun Fan's avatar Song Chun Fan
Browse files

[pm] clean up nullable_data_dir flag

BUG: 409611766
Test: presubmit
FLAG: EXEMPT removing nullable_data_dir

Change-Id: I50b463dd7587570f7d957469e01f7aa8ae659487
parent 0ef534f5
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -33,14 +33,6 @@ flag {
    bug: "296644915"
}

flag {
    name: "nullable_data_dir"
    namespace: "package_manager_service"
    description: "Feature flag to allow ApplicationInfo.dataDir to be null."
    bug: "302587814"
    is_fixed_read_only: true
}

flag {
    name: "get_package_info"
    is_exported: true
+4 −8
Original line number Diff line number Diff line
@@ -423,8 +423,7 @@ public class PackageInfoUtils {
        if (ai.isArchived) {
            ai.nonLocalizedLabel = state.getArchiveState().getActivityInfos().get(0).getTitle();
        }
        if (!state.isInstalled() && !state.dataExists()
                && android.content.pm.Flags.nullableDataDir()) {
        if (!state.isInstalled() && !state.dataExists()) {
            // The data dir has been deleted
            ai.dataDir = null;
        }
@@ -1069,8 +1068,7 @@ public class PackageInfoUtils {
            return;
        }

        if (!state.isInstalled() && !state.dataExists()
                && android.content.pm.Flags.nullableDataDir()) {
        if (!state.isInstalled() && !state.dataExists()) {
            // The data dir has been deleted
            output.dataDir = null;
            return;
@@ -1118,8 +1116,7 @@ public class PackageInfoUtils {
            return;
        }

        if (!state.isInstalled() && !state.dataExists()
                && android.content.pm.Flags.nullableDataDir()) {
        if (!state.isInstalled() && !state.dataExists()) {
            // The data dir has been deleted
            output.dataDir = null;
            return;
@@ -1167,8 +1164,7 @@ public class PackageInfoUtils {
        }

        if (!ps.getUserStateOrDefault(userId).isInstalled()
                && !ps.getUserStateOrDefault(userId).dataExists()
                && android.content.pm.Flags.nullableDataDir()) {
                && !ps.getUserStateOrDefault(userId).dataExists()) {
            // The app has been uninstalled for the user and the data dir has been deleted
            return null;
        }