diff options
| -rw-r--r-- | telephony/common/com/android/internal/telephony/CarrierAppUtils.java | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/telephony/common/com/android/internal/telephony/CarrierAppUtils.java b/telephony/common/com/android/internal/telephony/CarrierAppUtils.java index 6482432f4049..ff9cba2795fd 100644 --- a/telephony/common/com/android/internal/telephony/CarrierAppUtils.java +++ b/telephony/common/com/android/internal/telephony/CarrierAppUtils.java @@ -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,21 +252,17 @@ 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 - == PackageManager.COMPONENT_ENABLED_STATE_DEFAULT - && (ai.flags & ApplicationInfo.FLAG_INSTALLED) != 0) { - Log.i(TAG, "Update state (" + packageName - + "): DISABLED_UNTIL_USED for user " + userId); - context.createContextAsUser(UserHandle.of(userId), 0) - .getPackageManager() - .setSystemAppState( - packageName, - PackageManager.SYSTEM_APP_STATE_UNINSTALLED); - } + // 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 + + "): DISABLED_UNTIL_USED for user " + userId); + context.createContextAsUser(UserHandle.of(userId), 0) + .getPackageManager() + .setSystemAppState( + packageName, + PackageManager.SYSTEM_APP_STATE_UNINSTALLED); } // Associated apps are more brittle, because we can't rely on the distinction |