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

Commit 436c93d6 authored by Xin Guan's avatar Xin Guan Committed by Android (Google) Code Review
Browse files

Merge "Don't check for carrier privileged apps." into main

parents 837762a5 6189dba3
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -264,6 +264,8 @@ public class AppStandbyController
    @GuardedBy("mCarrierPrivilegedLock")
    private boolean mHaveCarrierPrivilegedApps;

    private final boolean mHasFeatureTelephonySubscription;

    /** List of carrier-privileged apps that should be excluded from standby */
    @GuardedBy("mCarrierPrivilegedLock")
    private List<String> mCarrierPrivilegedApps;
@@ -603,6 +605,8 @@ public class AppStandbyController
        mContext = mInjector.getContext();
        mHandler = new AppStandbyHandler(mInjector.getLooper());
        mPackageManager = mContext.getPackageManager();
        mHasFeatureTelephonySubscription = mPackageManager.hasSystemFeature(
                PackageManager.FEATURE_TELEPHONY_SUBSCRIPTION);

        DeviceStateReceiver deviceStateReceiver = new DeviceStateReceiver();
        IntentFilter deviceStates = new IntentFilter(BatteryManager.ACTION_CHARGING);
@@ -1515,7 +1519,7 @@ public class AppStandbyController
        }

        // Check this last, as it can be the most expensive check
        if (isCarrierApp(packageName)) {
        if (mHasFeatureTelephonySubscription && isCarrierApp(packageName)) {
            return STANDBY_BUCKET_EXEMPTED;
        }