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

Commit a2728a27 authored by Yiling Chuang's avatar Yiling Chuang Committed by Nolen Johnson
Browse files

RESTRICT AUTOMERGE 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

(cherry picked from commit 419a6a90)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:62b0014ed6e69b0abc48a5c18b740f95bc5dc429)
Merged-In: I486820ca2afecc02729a56a3c531fb931c1907d0
Change-Id: I486820ca2afecc02729a56a3c531fb931c1907d0
parent 286a8c80
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -234,6 +234,11 @@ public class AdvancedPowerUsageDetail extends DashboardFragment implements
        initPreference();
    }

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

    @VisibleForTesting
    void initAnomalyInfo() {
        mAnomalies = getArguments().getParcelableArrayList(EXTRA_ANOMALY_LIST);
+3 −0
Original line number Diff line number Diff line
@@ -434,5 +434,8 @@ public class AdvancedPowerUsageDetailTest {
        mFragment.initAnomalyInfo();

        verify(mAnomalySummaryPreferenceController).updateAnomalySummaryPreference(mAnomalies);

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