This CL adds confirmation dialog in "Restrict app page". By go through
BatteryTipDialogFragment, it will find the correct action, in which
we already have log:
1. RestrictAppAction
2. UnRestrictAppAction
Bug: 79992590
Test: RunSettingsRoboTests
Change-Id: I179fbd17a012528fdfacf42e4a93943eaefff23d
Merged-In: I179fbd17a012528fdfacf42e4a93943eaefff23d
* Using getConnectedDevicesSummaryResourceId() to get the resource id to shown the summary.
Bug: 79299421
Test: make -j50 RunSettingsRoboTests
Change-Id: I268de4d989fe01eff463a5ec1c0a174e094e56c0
This was made implicit which is confusing for the user so this CL
adds a preference to make the user manually choose their security
type.
Test: robotests
Fixes: 79435112
Change-Id: Ie78806e8952b52e1b7cd21f0b87c9d064acaff64
Merged-In: Ie78806e8952b52e1b7cd21f0b87c9d064acaff64
Add a switch to make logical camera as default camera (with smaller
camera id) for 3rd party app.
Test: Manually using Settings app, RunSettingsRoboTests
Bug: 77600932
Change-Id: I86c7f3b9830fb376b324621feb31cdfac59faee5
Merged-In: I86c7f3b9830fb376b324621feb31cdfac59faee5
The cache in ApplicationsState is causing a lot of damage because AS
object is not smart enough to invalidate the cache in all conditions. So
we end up having bugs like stale app label or icon in weird cases.
This change stops using the cache when loading app icon in entity
headres. This is only a stop gap solution to fix most visible (and most
frequently complained) parts of the page. We still need to address the
cache in ApplicationsState eventually.
Change-Id: Iea88ad99d4069d678d09943cfb0b0e5c94eb3326
Fixes: 79881693
Test: robotests
When restrict tip update, we should also update app list unless it goes
from NEW to INVISIBLE. After that it won't show "0 apps been
restricted".
Change-Id: Iedf4288fcddfe632a9ba8c16afdfb5bc044bce2e
Fix: 79890132
Test: RunSettingsRoboTests
* Add AdvancedConnectedDeviceController that used to show which component is available
* Add getConnectedDevices Summary Resource Id() to decide which string should be shown.
Here have 4 cases to shown the string.
case 1: driving mode available and NFC is availalbe, show "Bluetooth, driving mode, NFC"
case 2: driving mode available and NFC is not availalbe, show "Bluetooth, driving mode"
case 3: driving mode not available and NFC is availalbe, show "Bluetooth, NFC"
case 4: driving mode not available and NFC not availalbe, show "Bluetooth"
* Add test to verify the summary string is correct in each condition
* Add test to verify getAvailabilityStatus() is AVAILABLE.
Bug: 79299421
Test: make -j50 RunSettingsRoboTests ROBOTEST_FILTER=AdvancedConnectedDeviceControllerTest
Change-Id: I1048355bbd344db3ab645dd1537b4259eff57f38
Merged-In: I1048355bbd344db3ab645dd1537b4259eff57f38
For settings which can change in the framework, outside of
the settings app and a slice, a Slice needs to be able to
register a listener for these changes.
Adding a getter for an IntentFilter in BasePreferenceControllers
allows us to use the SliceBroadcastRelay in SysUi to listen for
these changes.
Test: robotests
Fixes: 78138654
Change-Id: I579375069ca98fd21b60cd3a69c1a122cabf96e2
Merged-In: Ifa05b651aaa3458c54866f71469964b1a070e458
* Add PreviouslyConnectedDevicePreferenceController to handle the preference should be
enable or disable.
Example: If there are no previously connected devices disable the preference otherwise
enable it.
* Add PreviouslyConnectedDevicePreferenceControllerTest
1. Verify the callback can be registered and unregistered
2. Verify the preference is enable when there
have more than 1 previously connected device
3. Verify the preference is disable when there
have no previously connected device
Bug: 78250052
Test: make -j50 RunSettingsRoboTests
Change-Id: I31b5d416aaf907c3bbf1cb61de6e7401463e3df7
Merged-In: I31b5d416aaf907c3bbf1cb61de6e7401463e3df7
Add DND Slice as a special case, since there is an existing
inheritance structures in the zen mode preference controllers which
would be too risky to change at this point in the release.
Change-Id: If4b7013be35c89695786af2dbbea2edcf7a189f3
Merged-In: Ice608b9a7bd6f38b73e581eb3723f0a2fae96f2b
Test: make RunSettingsRoboTests
Fixes: 67997377
Before this CL, we will drop log for excessive bg anomaly that
target O or higher. This CL doesn't drop it however merge it to
ACTION_ANOMALY_IGNORED
Bug: 79944380
Test: RunSettingsRoboTests
Change-Id: I46d0bdb1191d8843ba373e59afb1b0ba16057661
When airplane mode is off, fall back to default summary
(tether off summary). It should be fine because once tether
state get updated again, it will go through original listener
to update the summary.
Change-Id: Iba9b56f452e72365ea964d841ee156a2625c0ae1
Fixes: 79721162
Test: RunSettingsRoboTests
Add a custom Wifi Slice to the Settings Slice Provider.
It needs a custom Slice because of the complicated listener logic
in the MasterSwitchPreferenceController, which makes it hard to
work-in synchronous set/get logic.
The one-off Slice requires extra changes, including:
- Including it in getDescendants
- Handling changes to wifi by the framework
This is the first change that uses SettingsLib's broadcast relay,
which allows settings to (un)register IntentFilters to a Uri,
allowing Settings Slices affected by the framework (quicksettings,
connectivity related, volume, etc) to be updated without action
on the Slice.
Fixes: 70622039
Fixes: 67997332
Test: robotests
Change-Id: Ia76738dd6baacd5522d52df2c61ebad86a600282
Merged-In: Ibfe4736beecb833e3f6bb871b2eb5228a5fd3a34
* Add AudioSwitchCallback() in AudioSwitchPreferenceController.
This callback is used to notify SoudSettings to update the dialogFragment UI.
* Add UpdatableListPreferenceDialogFragment that updates the available
options when dialog is shown
* Add test to verify the adapter count when
onListPreferenceUpdated() is called.
Bug: 77783217
Test: make -j50 RunSettingsRoboTests
Change-Id: I8cac1b30ec50df026f4b7722dd1cd2f69e77a4cb
Merged-In: I8cac1b30ec50df026f4b7722dd1cd2f69e77a4cb
* Using getAliasName() instead of getName()
* Add BluetoothDevice isConnected check, when BluetoothDevice is
disconnected. Do not add to the show list.
Bug: 77783217
Test: make -j50 RunSettingsRoboTests
Change-Id: I183fc693eaefd690568ba2f1ec740258b2bb62c8
Usecase:
1.) Make sure BT is turned off.
2.) Go to Settings -> Network & Internet
3.) Press back from Network & Internet.
4.) Repeat above step 2000 times
Expected Result:
No ANR/Crashed should be seen.
Observed Result:
ServiceConnection leak is happening & android setting app get crashed.
Root cause: TetherPreferenceController tries to get
pan Proxy object, when BT is oFF, which is leaking one
service connection each time
Fix: getProfileProxy for Pan must only be called, when BT is
turned on.
Test: lifeCycle_onCreate_shouldNotInitBluetoothPanWhenBluetoothOff
Bug: 79561076
Change-Id: I85208f48ce4dded94020cb156fcdb98b2cc873f9
(cherry picked from commit 31bcf6225cdabee4f810d4fe55ea32d0d43a9c5c)
(cherry picked from commit 31c799305b480e56bd083a48c6acca11572ebe16)
Convert below to TogglePreferenceController:
MagnificationNavbarPreferenceController
(Magnify with Button)
MagnificationGesturesPreferenceController
(Magnify with triple-tap)
The two controllers share the same fragment,
Add static method for set/get state in fragment,
And use them in controllers and fragment.
Change-Id: I2bdbdb36be71e1a3ffb557abc5a6115d48de53cf
Merged-In: I2bdbdb36be71e1a3ffb557abc5a6115d48de53cf
Fixes: 67997698
Fixes: 67997726
Test: make RunSettingsRoboTests
To improve context on search surfaces where the
setting may be ambiguous, we set the screentitle
as the summary text as the top priority. If there is
no screentitle or the it matches the title, then we
try to use the controller summary. If the controller
summary is not valid, then we show nothing.
Bug: 79780762
Test: robotests
Change-Id: If4f7f8d4a072125604ede14e3df2afd667fa24b7
Use TogglePreferenceController instead of AbstractPreferenceController
for VibrateWhenRingPreferenceControllr
Bug:74915140
Test: make RunSettingsRoboTests
Change-Id: Ib06126324516826411a7d50a2bd8a790bfd477c7
Merged-In: I501a1470da7dc1ff582c2a90b5235b25036caefc