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

Commit 107be82a authored by Kweku Adams's avatar Kweku Adams
Browse files

Reduce widget exemption status.

Apps with active widgets should be fine operating in the ACTIVE bucket
instead of being fully exempted from app standby. They were previously
put in the EXEMPTED bucket because we previously didn't have a concept
of exemption levels.

Bug: 156236665
Test: atest FrameworksServicesTests:AppIdleHistoryTests
Test: atest FrameworksServicesTests:AppStandbyControllerTests
Change-Id: Iea30f00ca8199f487bcc3281e4ae3f98b41d369f
parent 0a1a911a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1098,8 +1098,7 @@ public class AppStandbyController implements AppStandbyInternal {

            if (mAppWidgetManager != null
                    && mInjector.isBoundWidgetPackage(mAppWidgetManager, packageName, userId)) {
                // TODO: consider lowering to ACTIVE
                return STANDBY_BUCKET_EXEMPTED;
                return STANDBY_BUCKET_ACTIVE;
            }

            if (isDeviceProvisioningPackage(packageName)) {
+1 −1
Original line number Diff line number Diff line
@@ -387,7 +387,7 @@ public class AppStandbyControllerTests {
    @Test
    public void testBoundWidgetPackageExempt() throws Exception {
        assumeTrue(mInjector.getContext().getSystemService(AppWidgetManager.class) != null);
        assertEquals(STANDBY_BUCKET_EXEMPTED,
        assertEquals(STANDBY_BUCKET_ACTIVE,
                mController.getAppStandbyBucket(PACKAGE_EXEMPTED_1, USER_ID,
                        mInjector.mElapsedRealtime, false));
    }