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

Commit c8320565 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Clean up aconfig flag hide_preinstalled_carrier_app_at_most_once" into main

parents 9e8540c8 cc51fe28
Loading
Loading
Loading
Loading
+11 −16
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ import android.util.ArrayMap;
import android.util.Log;

import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.telephony.flags.Flags;
import com.android.internal.telephony.util.TelephonyUtils;

import java.util.ArrayList;
@@ -253,11 +252,8 @@ public final class CarrierAppUtils {
                    // 3. It has not been installed as an update from its system built-in version
                    // 4. It is in default state (not explicitly DISABLED/DISABLED_BY_USER/ENABLED)
                    // 5. It is currently installed for the calling user
                    // TODO(b/329739019):
                    // 1. Merge the nested if conditions below during flag cleaning up phase
                    // 2. Support user case that NEW carrier app is added during OTA, when emerge.
                    if (!Flags.hidePreinstalledCarrierAppAtMostOnce() || !hasRunEver) {
                        if (!isUpdatedSystemApp(ai) && enabledSetting
                    // TODO(b/329739019):Support user case that NEW carrier app is added during OTA
                    if (!hasRunEver && !isUpdatedSystemApp(ai) && enabledSetting
                            == PackageManager.COMPONENT_ENABLED_STATE_DEFAULT
                            && (ai.flags & ApplicationInfo.FLAG_INSTALLED) != 0) {
                        Log.i(TAG, "Update state (" + packageName
@@ -268,7 +264,6 @@ public final class CarrierAppUtils {
                                        packageName,
                                        PackageManager.SYSTEM_APP_STATE_UNINSTALLED);
                    }
                    }

                    // Associated apps are more brittle, because we can't rely on the distinction
                    // between "default" and "enabled". To account for this, we have two cases: