If permission review is enabled toggling bluetoth on or off
results in a user prompt to collect consent. This applies
only to legacy apps, i.e. ones that don't support runtime
permissions as they target SDK 22.
bug:28715749
Change-Id: I0b9065446f9d0cfb819065eaf2dc160eb1c1f7ec
When rotating the device, the Activity of the target
Fragment become null. So NullPointerException occurs.
The dialog should check if the Activity is null
before calling onActivityResult().
Bug: 28333723
Test: manual - go to Settings > Apps > Clock,
click Battery optimization and rotate device
Change-Id: I7f68d6ece7d169fd96d04c1788e55ee506aae1ae
This is a cherry-pick of ag/1640561.
1. Context.getActivityToken is not available in n mr2, passed the token
from the activity to the controller instead.
2. Haven't pick the tests from master to mr2 branch because robotest
is not set up in mr2 branch.
Fix: 32959373
Change-Id: I2f73d01ab11e91b337beb90c05bbcb857dfd40dc
Also fix how icon is loaded. IconResId is specific to the package of the
indexed result. If result comes from external app, icon needs to be
decoded against the external app's package context.
Bug: 33432310
Test: RunSettingsRoboTests
Change-Id: Ia0c53e63be757405dfaeceb2d865e7d8de87c5ee
- if the user has restriction for the action
DISALLOW_DEBUGGING_FEATURES, remove the preference for taking bug
report and the switch preference to enable bug report shortcut in the
power key.
- refactor DevelopmentSettings to use preference controller for Take bug
report and enable bug report in power key.
Fixes: 27145643
Test: make RunSettingsRoboTests
Change-Id: I18784d218d37956130c33f527d514ab703727397
The core of the change is in ManageAccountSettings#showSyncState(). New
code caches as much information as it can. And break out of loops as
early as possible.
Bug: 28575620
Test: make RunSettingsRoboTests
Change-Id: I076ce148e3d8db55f6cadfd9491f037f7a55a986
This adds bunch of shadow/placeholder classes and logic to handle
references to Android internal resources or newly added classes/methods
that Robolectric hasn't yet picked up.
Developers can follow ManageApplicationsTest example to use the shadow
classes and the utility method to start ther fragment in their
robolectric tests.
Bug: 33431346
Test: This is a test improvement CL. RunSettingsRoboTests still passes.
Change-Id: I943ab871631cb8c368d9f9db481c00558c5c4d1f
The old layout is inherited from LauncherActivity, which uses a
inconsistent theme and UI between phone and tablet. It's more consistent
to just use a single layout that matches setting theme.
Fixes: 32220535
Test: runtest --path packages/apps/Settings/tests/app/src/com/android/settings/CreateShortcutTest.java
Change-Id: I769d1404c82c2057bf021e4cf557e7cf397d92a7
- second round of refactoring SoundSettings to use preference
controller.
- add controller for Emergency broadcast, Vibrate when ring, Phone
ringtone, Alarm ringtone, and Notification ringtone.
Bug: 32276590
Test: make RunSettingsRoboTests
Change-Id: Iaff48ecb27bf156a5c8995de20ce7a440b094cdb
- The loader filters out system apps.
- Loader performs case-insensitive match with app names.
- SearchResultAdapter combines results from multiple loaders into a
single list.
Fixes: 33347966
Test: make RunSettingsRoboTests
Change-Id: I228ca6fb82f0ac5151b2346c079c2de41104a4df
The test is going into settings because of the lack testing
support in framework/base for this kind of change, and
because Settings search depends on this change.
Test: make RunSettingsUnitTests
Bug: 33390556
Change-Id: I8a87d4228a37fca475791409b89c7d135c29004a