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
Change-Id: I486820ca2afecc02729a56a3c531fb931c1907d0
Merged-In: I486820ca2afecc02729a56a3c531fb931c1907d0
(cherry picked from commit 419a6a9079
)
This commit is contained in:
@@ -276,6 +276,11 @@ public class AdvancedPowerUsageDetail extends DashboardFragment implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean shouldSkipForInitialSUW() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
void initHeader() {
|
void initHeader() {
|
||||||
final View appSnippet = mHeaderPreference.findViewById(R.id.entity_header);
|
final View appSnippet = mHeaderPreference.findViewById(R.id.entity_header);
|
||||||
|
@@ -780,4 +780,9 @@ public class AdvancedPowerUsageDetailTest {
|
|||||||
new Pair(ConvertUtils.METRIC_KEY_BATTERY_USAGE, "app label")
|
new Pair(ConvertUtils.METRIC_KEY_BATTERY_USAGE, "app label")
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void shouldSkipForInitialSUW_returnTrue() {
|
||||||
|
assertThat(mFragment.shouldSkipForInitialSUW()).isTrue();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user