3035 Commits

Author SHA1 Message Date
Stanley Tng
8c0f800831 Disable Hearing Aid Profile for all platforms except Pixels
Add code to selectively disable Hearing Aid Profile depending on the
config.xml file.
Note: Cherry-picked from internal branch.

Bug: 78142728
Test: Manual Pairing on various Pixel phones
Change-Id: I8094f1a1665647b026eb9601e032fb7fbb816ec6
(cherry picked from commit a21efa58369b304e5ea818a3f8b1577f1fed3d02)
2018-04-30 08:54:47 -07:00
timhypeng
68af4849ca Update connected device summary
am: f050932e2a

Change-Id: I9d1cb57140ad8f71e3f565b27e9dccfeb97ee0be
2018-04-30 02:24:24 -07:00
timhypeng
7128338376 Add isAudioModeOngoingCall function to check call status
am: 1b25c9a89c

Change-Id: I24b89b51a275149ec02e4c59b6a7bbc7ccd072a0
2018-04-30 02:14:08 -07:00
timhypeng
f050932e2a Update connected device summary
* 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
2018-04-30 15:35:08 +08:00
timhypeng
1b25c9a89c Add isAudioModeOngoingCall function to check call status
*return true if it is in ringing/call/communication(VoIP) status

Bug: 78318415
Test: make -j50 RunSettingsLibRoboTests
Change-Id: Ifb84da386fcd5bf03eaccf78fc264fbad86a9707
2018-04-30 15:30:17 +08:00
Bill Yi
6bfcfd4827 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I81f44608957ac56ad790ce277c26fbe0f69791de
2018-04-28 15:01:05 -07:00
Stanley Tng
1a8ddced08 Merge "Disable Hearing Aid Profile for all platforms except Pixels" into pi-dev
am: 3de2854c75

Change-Id: I57f9befa4f5a0a7a15ad6b1d979f4bb35fa87494
2018-04-27 11:40:45 -07:00
Stanley Tng
3de2854c75 Merge "Disable Hearing Aid Profile for all platforms except Pixels" into pi-dev 2018-04-27 18:27:38 +00:00
Jovana Knezevic
9df8e55021 Merge "Fixes null-ref when trying to start Guest session." into pi-dev
am: 8491304cf6

Change-Id: I71133790a4b5be41c05cede67c2122e6681199fe
2018-04-26 12:55:30 -07:00
Stanley Tng
a21efa5836 Disable Hearing Aid Profile for all platforms except Pixels
Add code to selectively disable Hearing Aid Profile depending on the
config.xml file.

Bug: 78142728
Test: Manual Pairing on various Pixel phones
Change-Id: I8094f1a1665647b026eb9601e032fb7fbb816ec6
2018-04-26 12:41:14 -07:00
Jovana Knezevic
8491304cf6 Merge "Fixes null-ref when trying to start Guest session." into pi-dev 2018-04-26 19:40:02 +00:00
Tony Mak
45f3997297 Merge "Pipe the user restriction to the admin dialog" into pi-dev
am: c76929eb92

Change-Id: Iaba71e51075c6c1ce7c3e4bf71750c8baace89a3
2018-04-26 04:17:35 -07:00
TreeHugger Robot
c76929eb92 Merge "Pipe the user restriction to the admin dialog" into pi-dev 2018-04-26 11:05:21 +00:00
jovanak
6639c4dfa1 Fixes null-ref when trying to start Guest session.
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
2018-04-25 16:10:59 -07:00
Fan Zhang
72e8d917d2 Merge "Move brightness color conversion from SysUI to settingslib" into pi-dev
am: 04d504be03

Change-Id: I200dc03637fb358b6862db27babb781b851bbc97
2018-04-25 08:19:17 -07:00
Tony Mak
c001987483 Pipe the user restriction to the admin dialog
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
2018-04-25 12:30:01 +01:00
Fan Zhang
106b1c0d80 Move brightness color conversion from SysUI to settingslib
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
2018-04-24 12:00:47 -07:00
Stanley Tng
e653c11aa2 Merge "Fixed ConcurrentModificationException with HearingAids profile" into pi-dev
am: 36f15ae21c

Change-Id: I095a1632f29d9ac94859a3d2eace1bc207632334
2018-04-23 09:03:47 -07:00
TreeHugger Robot
36f15ae21c Merge "Fixed ConcurrentModificationException with HearingAids profile" into pi-dev 2018-04-23 15:53:47 +00:00
TreeHugger Robot
58b8ca51d6 Merge "Import translations. DO NOT MERGE" into pi-dev 2018-04-21 05:42:29 +00:00
Salvador Martinez
4e6ef66fc1 Merge "Add composite string for battery summary in settings" into pi-dev
am: a6b7a6fb33

Change-Id: Ia74ede8fb5f16c5ec89ca15e81b977ed272d9dda
2018-04-20 17:30:06 -07:00
Salvador Martinez
a6b7a6fb33 Merge "Add composite string for battery summary in settings" into pi-dev 2018-04-20 23:27:25 +00:00
Stanley Tng
16a56909a6 Fixed ConcurrentModificationException with HearingAids profile
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
2018-04-20 14:22:30 -07:00
Bill Yi
55108ef7ea Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I55740883147a59ce27b7321edca8030298ecc729
2018-04-20 08:07:46 -07:00
Jason Monk
a2045b83ff Merge "Add way to use sysui as a broadcast relay for slices" into pi-dev
am: ea56921d76

Change-Id: I99e4fc78627ca79eb7ed3f6eced0825c5345669f
2018-04-20 07:07:44 -07:00
TreeHugger Robot
ea56921d76 Merge "Add way to use sysui as a broadcast relay for slices" into pi-dev 2018-04-20 13:54:15 +00:00
Jason Monk
0b5e52ccd8 Add way to use sysui as a broadcast relay for slices
Test: runtest systemui
Bug: 78139069
Change-Id: I64c4d56cca005cec7204bf45215bb7b0015f4571
2018-04-20 12:36:31 +00:00
Salvador Martinez
2ab853d940 Merge "Add ability to set onShowListener to custom dialog pref" into pi-dev
am: c2120a10f7

Change-Id: I06fddba7f72558bdc2b32fb768e550317264dbfe
2018-04-19 17:45:51 -07:00
TreeHugger Robot
c2120a10f7 Merge "Add ability to set onShowListener to custom dialog pref" into pi-dev 2018-04-20 00:15:45 +00:00
Amin Shaikh
1ee437e493 Merge "Update wifi enabled state when connected." into pi-dev
am: 8a87e9ddd8

Change-Id: Iaf5108f48f89406a9c0371fdbc97f5ad81bda559
2018-04-19 16:49:03 -07:00
Salvador Martinez
b9683d4920 Add composite string for battery summary in settings
We needed a string with the percentage in the front. This CL
adds a composite string to create it out of an already exisitng
string rather than trying to make another power remaining
variant.

Test: robotests is sister CL
Bug: 77874406
Change-Id: I31edcc06f3a504c6400c506f961fb35b6afc6abd
2018-04-19 13:07:58 -07:00
Amin Shaikh
eddaf3f7a0 Update wifi enabled state when connected.
Change-Id: Ib0be6b3ab8139781868781c370688d70cef22553
Fixes: 78242165
Test: runtest systemui
2018-04-19 11:20:21 -04:00
Evan Laird
763bead125 Merge "Bold the battery saver '+' icon" into pi-dev
am: 9f8753230f

Change-Id: I1d85d92a0e7b6791af0f4297f0490158c9e1fbfc
2018-04-17 06:38:57 -07:00
TreeHugger Robot
9f8753230f Merge "Bold the battery saver '+' icon" into pi-dev 2018-04-17 13:28:42 +00:00
Salvador Martinez
1345d5e16b Merge "Make util method public" into pi-dev
am: 64e497672d

Change-Id: Iad466f4f1cd0b588e1afeb50411162940ffeee25
2018-04-17 00:35:00 -07:00
TreeHugger Robot
64e497672d Merge "Make util method public" into pi-dev 2018-04-17 07:22:25 +00:00
Salvador Martinez
2ee2b0a785 Make util method public
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
2018-04-16 16:31:37 -07:00
TreeHugger Robot
309a2818b9 Merge "Import translations. DO NOT MERGE" into pi-dev 2018-04-16 22:57:27 +00:00
Evan Laird
6596266aa4 Bold the battery saver '+' icon
Now with 50% more width!
Now with 50% more colorError!

Test: visual
Change-Id: I21d4cecf5e1f3ae4dd2d7a7e5b372591e2ff83a3
Fixes: 74764821
2018-04-16 17:52:27 -04:00
hughchen
bfdd51a466 Merge "Add new function to get audio state" into pi-dev
am: e504e1322e

Change-Id: I776ef38002527e9a3db49896b86fe377fce01e8f
2018-04-16 11:55:54 -07:00
Bill Yi
b371e05765 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: Iedb29c910eba362a7bbe038cd61fe98d8e1097a0
2018-04-16 11:46:39 -07:00
TreeHugger Robot
e504e1322e Merge "Add new function to get audio state" into pi-dev 2018-04-16 18:34:37 +00:00
Isha Bobra
b019b0b361 The file CachedBluetoothDeviceManager.java performs synchronization at class level. This CL just adds the missing synchronization bits.
am: d467da7309

Change-Id: I0c2d1b207276aad17e369eefdf041a046a08a68a
2018-04-16 10:22:50 -07:00
Isha Bobra
d467da7309 The file CachedBluetoothDeviceManager.java performs synchronization
at class level. This CL just adds the missing synchronization bits.

Test: Manual
Change-Id: I71e0a194f8d126c2898a4086d6bcb62156cab9ad
Bug: 77849851
2018-04-16 16:55:48 +00:00
Isha Bobra
c19f0a6649 Merge "Show only 1 entry for hearing aid device after killing the activity." into pi-dev
am: ed344d1753

Change-Id: I9f9df695df7555ea67cf4ca371528b9246d70dff
2018-04-16 09:55:47 -07:00
Isha Bobra
ed344d1753 Merge "Show only 1 entry for hearing aid device after killing the activity." into pi-dev 2018-04-16 16:42:33 +00:00
hughchen
23b947e245 Add new function to get audio state
* Add getAudioState()
* Add isA2dpDevice() and isHfpDevice() in CachedBluetoothDevice

Bug: 74134939
Test: make RunSettingsLibRoboTests -j40
Change-Id: I18f4c1fcad0325a57de379f5ffe5b1135a00d084
2018-04-15 04:22:45 +00:00
HJ ChangLiao
177fdf2277 Merge "Add new category key for ConnectDeviceFrag" into pi-dev
am: 6a7190cb97

Change-Id: Iafb52f567ff23925d28f1d0356553e398471cbe8
2018-04-14 20:55:24 -07:00
TreeHugger Robot
6a7190cb97 Merge "Add new category key for ConnectDeviceFrag" into pi-dev 2018-04-14 23:12:48 +00:00
Isha Bobra
c3d9413020 Show only 1 entry for hearing aid device after killing the activity.
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
2018-04-13 22:51:06 +00:00