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

Commit 419a6a90 authored by Yiling Chuang's avatar Yiling Chuang
Browse files

FRP bypass defense in App battery usage page

Before the setup flow completion, don't allow the app info page in App battery usage to be launched.

Bug: 327748846
Test: atest SettingsRoboTests + manual test
- factory reset + launch app battery usage app info via ADB during Setup -> verify app closes
Flag : EXEMPT bugfix

Change-Id: I486820ca2afecc02729a56a3c531fb931c1907d0
parent 8d5d69d6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -268,6 +268,11 @@ public class AdvancedPowerUsageDetail extends DashboardFragment
        mLogStringBuilder = new StringBuilder("onResume mode = ").append(mOptimizationMode);
    }

    @Override
    protected boolean shouldSkipForInitialSUW() {
        return true;
    }

    @Override
    public void onPause() {
        super.onPause();
+5 −0
Original line number Diff line number Diff line
@@ -441,4 +441,9 @@ public class AdvancedPowerUsageDetailTest {
        TimeUnit.SECONDS.sleep(1);
        verifyNoInteractions(mMetricsFeatureProvider);
    }

    @Test
    public void shouldSkipForInitialSUW_returnTrue() {
        assertThat(mFragment.shouldSkipForInitialSUW()).isTrue();
    }
}