mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-15 02:44:23 -05:00
f75cf77da2
Signed-off-by: Tavi <tavi@divested.dev>
53 lines
2.2 KiB
Diff
53 lines
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Yiling Chuang <emilychuang@google.com>
|
|
Date: Mon, 8 Jul 2024 03:09:50 +0000
|
|
Subject: [PATCH] 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 419a6a907902a12a0f565c808fa70092004d6686)
|
|
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e5d21702863284479af7561e3c833bc2cab2a7d3)
|
|
Merged-In: I486820ca2afecc02729a56a3c531fb931c1907d0
|
|
Change-Id: I486820ca2afecc02729a56a3c531fb931c1907d0
|
|
---
|
|
.../android/settings/fuelgauge/AdvancedPowerUsageDetail.java | 5 +++++
|
|
.../settings/fuelgauge/AdvancedPowerUsageDetailTest.java | 5 +++++
|
|
2 files changed, 10 insertions(+)
|
|
|
|
diff --git a/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetail.java b/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetail.java
|
|
index 3741bfe804..d89286d4e4 100644
|
|
--- a/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetail.java
|
|
+++ b/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetail.java
|
|
@@ -283,6 +283,11 @@ public class AdvancedPowerUsageDetail extends DashboardFragment implements
|
|
}
|
|
}
|
|
|
|
+ @Override
|
|
+ protected boolean shouldSkipForInitialSUW() {
|
|
+ return true;
|
|
+ }
|
|
+
|
|
@Override
|
|
public void onPause() {
|
|
super.onPause();
|
|
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetailTest.java b/tests/robotests/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetailTest.java
|
|
index 0a48cd1b12..212ac21cd0 100644
|
|
--- a/tests/robotests/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetailTest.java
|
|
+++ b/tests/robotests/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetailTest.java
|
|
@@ -859,4 +859,9 @@ public class AdvancedPowerUsageDetailTest {
|
|
|
|
verifyZeroInteractions(mBackupManager);
|
|
}
|
|
+
|
|
+ @Test
|
|
+ public void shouldSkipForInitialSUW_returnTrue() {
|
|
+ assertThat(mFragment.shouldSkipForInitialSUW()).isTrue();
|
|
+ }
|
|
}
|