This is to prevent essential default apps from being restricted in using
battery in the background.
Change-Id: Iac9db9c425a477680e41f73b2c0e7bc4e161ce9e
Merged-In: Iac9db9c425a477680e41f73b2c0e7bc4e161ce9e
Fixes: 76435804
Bug: 80428049
Test: robotests
When two Hearing Aids devices are bonded, we should only show one device
in the Settings App and at the correct location based on the connected
state of the HA devices. When at least one HA device is connected, then
the Settings App should show it as connected. Otherwise, the Settings
App should show it as disconnected when both devices are disconnected.
Bug: 79760469
Test: Run the robotests for Settings and SettingsLib
Change-Id: I33e19af054b686b3d71b00dcbd6ff16febde6099
- new icon size for edit pencil
- removed home.xml, it's not needed by anything except test
Bug: 77982107
Test: visual
Change-Id: I451bc12c4a57e5f61e7c561c394b00bd95e7228d
Androd auto still need the summaries with "Connected*" strings,
use separate method for android auto.
Bug: 78936284
Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=CachedBluetoothDeviceTest -j28
Change-Id: I0a5dff4ae231108f528f1cd2e2a25b2f4633ac99
With the new Multi-A2DP/HFP support, need to add profile connection state
changed callback for every BT device connect/disconnect to profile.
Bug: 76447449
Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=LocalBluetoothProfileManagerTest -j28
Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=BluetoothEventManagerTest -j28
Change-Id: Iaaec369e8d10f9b1270491632fb5c91de1e28571
New method takes packageName array and check whether there is doze
package inside.
Bug: 77924141
Test: RunSettingsLibRoboTests
Change-Id: I54d1882397e7bc14176cdd44f2b773952a304e44
* Add dispatchAudioModeChanged() in CachedBluetoothDeviceManager for notify
CacheBluetoothDevice to update their summary
* Add 5 combination that used to show the summary of CacheBluetoothDevice
case 1: device battery not unknown and is a active device
ex: show summary as "Active, 100% battery"
case 2: device battery unkonwn and is a active device
ex: show summary as "Active"
case 3: device battery not unknown and not a active device
ex: show summary as "100% battery"
case 4: device battery unkonwn and not a active device
ex: not show the summary
case 5: device is in bonding state
ex: show summary as "Pairing..."
Bug: 78318415
Test: make -j50 RunSettingsLibRoboTests
Change-Id: I70bf5386ff045ef4f07fb86fbdc8b943befc634c
*return true if it is in ringing/call/communication(VoIP) status
Bug: 78318415
Test: make -j50 RunSettingsLibRoboTests
Change-Id: Ifb84da386fcd5bf03eaccf78fc264fbad86a9707
CarUserSwitchingDialog threw null-ref because Guest didn't have
a default avatar.
1. Adds null guard in case default avatar is not set.
2. Populates default Guest avatar correctly.
Fixes:77546931
Fixes:78588087
Test: Manual, observing the default icon when starting a guest session.
Manual, observing the switching dialog icon without a default icon.
Change-Id: Iacbfcc65147fdbc5515c0d96eb613fb17543f6b3
This change allows us to show different strings for different user
restriction.
Instead of setting DevicePolicyManager.EXTRA_RESTRICTION everywhere
in Settings, EnforcedAdmin object now stores the restriction. So when
we are starting the admin dialog with the EnforcedAdmin object,
we can set the EXTRA_RESTRICTION bit.
Test: make RunSettingsLibRoboTests
Bug: 78443458
Change-Id: Iabc1629b9ed18f881cdc8c15ec5e49a4b50f76a4
The color space conversion logic in BrightnessController is also needed
by Settings app to display brightness percentage correctly. This change
moves the conversion logic to settingslib so it can be shared by other
UIs such as Settings/VrSettings.
Bug: 73810208
Test: atest RunSettingsLibRoboTests
Change-Id: If92f0da2d930fec797902b5d1b3731100e1d0ea4
Prevent ConcurrentModificationException crash when traversing the
mCachedDevices list by removing entries outside of the loop.
Bug: 78357837
Test: Runs ROBOTEST_FILTER=CachedBluetoothDeviceManagerTest make -j40 RunSettingsLibRoboTests
Change-Id: I27db2dc94a7d0108e9b848d187d4e5bc9f5b567c
A utility method is private but we need it elsewhere. This CL
just makes it public. Also it restricts the use of the method to
just rounding positive values to positive multiples. It is only
meant for rounding time.
Test: robotests
Bug: 77874313
Change-Id: Ieb222c7f752b6a907fca5f91ddd4f4a4b67a0d2a
This CL detects Bluetooth hearing aid devices and tries to
combine the entry of the hearing aids with the same HiSyncIds and
shows only 1 entry for each pair in the connected devices list. This CL
works for scenarios just after pairing and reopening settings
activity after killing it.
This CL also has the logic to combine the entries just after pairing and
to forget both the devices on pressing forget for the combined entry.
Test: RunSettingsLibRoboTests
Bug: 74204427
Change-Id: Ib4c76eb0cae12937dd8403e37a0af8297a4aedc2
For inject dynamic pref driving mode to
ConnectDeviceDashboardFragment,
Add a new category key for register it.
Bug: 72458929
Test: make RunSettingsLibRoboTests
Change-Id: Ifbbc8fc0f7b68ef68aff550851767a4f8ad7d9e6
User switcher wrongly called methods on the current process user,
which is always User 0 for SysUI.
Instead, user switcher requires knowledge about foreground user.
The process of user switching = changing the foreground
user.
Split tests between unit and robolectric.
Robolectric tests enable shadowing ActivityManager and UserHandle.
Fixes:77485524
Test: Unit and robolectric tests.
Change-Id: I20cc32f132ce48b4507a6907bdc9d103c04f4a30
Same broadcasts supported by UserSwitcherController.
Car User switcher listens to user changes.
Switcher needs to hear when the user is switched to dismiss the
keyguard,which causes the switching animation to terminate.
Bug:77653809
Test: Unit tests.
Change-Id: I633cbd9045e7254dcc173ca0e1118fca06c669df
ICU on android doesn't respect users 24 hour setting by default.
This CL makes it so that tell ICU what the users setting is so that
it will respect it.
Test: robotests updated
Bug: 77483888
Change-Id: I46eec2a10530b8b490f6a681c3a9b0a9dd4d68bd
Statsd blame app based on uid, which may mapping to multiple packages.
If there is one app in whitelist, then we shouldn't blame other apps
in same group.
Bug: 77560853
Test: RunSettingsLibTests
Change-Id: Ic21fea9701f9199c016674eaca3b0382e3a80837
* Add this API for checking audio status from BlueTooth Headset Service
Bug: 74130772
Test: ROBOTEST_FILTER="HeadsetProfileTest" make -j40 RunSettingsLibRoboTests
Change-Id: I80b3dbc8b0f9926859ff08f6849cafca89e940a7
Fixing a failing test. Currently unable to test removing current user, since current user is system user.
Fixes: 73415209
Test: unit tests
Change-Id: Ie374aa97383e3dd8ec4ef96b0d680fa8a04172b5