Not showing apps that are targeting SDK < 31, because the change is not enabled for them. Now alarm manager service manages killing the process whenever the permission gets revoked, so we don't need to do it here. This also lets us kill the app on "Reset app preferences" if needed. Adding the preference under "Advanced" in the app info page so it appears for apps that have requested this permission. Test: atest SettingsUnitTests:AppStateAlarmsAndRemindersBridgeTest make -j64 RunSettingsRoboTests \ ROBOTEST_FILTER="AlarmsAndRemindersDetailsTest| AlarmsAndRemindersDetailPreferenceControllerTest" Manually: - There should be no observable difference in behavior when toggling the setting. ActivityManager logs should still indicate that the app is killed when the permission is revoked. - "Alarms & Reminders" should appear under "Advanced" when looking at the app info detail of an app that appears under "Alarms & reminders" special app access page. Bug: 179541791 Bug: 190070171 Change-Id: I2d437cec10ee10e4326fb25b2820de9ef9c31c67
Running Settings Robolectric tests
The full suite
$ croot
$ make RunSettingsRoboTests
Running a single test class
$ croot
$ make RunSettingsRoboTests ROBOTEST_FILTER=<ClassName>
For example:
make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
You can also use partial class name in ROBOTEST_FILTER. If the partial class name matches multiple file names, all of them will be executed.