Commit Graph

2824 Commits

Author SHA1 Message Date
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
eddaf3f7a0 Update wifi enabled state when connected.
Change-Id: Ib0be6b3ab8139781868781c370688d70cef22553
Fixes: 78242165
Test: runtest systemui
2018-04-19 11:20:21 -04:00
TreeHugger Robot
9f8753230f Merge "Bold the battery saver '+' icon" into pi-dev 2018-04-17 13:28:42 +00: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
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
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
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
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
Salvador Martinez
3e70811b73 Add ability to set onShowListener to custom dialog pref
Currently there is no way to ensure something happens when the
dialog first shows since the getter for it is best effort. This CL
makes it so that a preference can provide an onShowListener so we
can do things right when the dialog becomes available.

Test: robotests in sister CL
Bug: 73102003
Change-Id: I269c3d89dc2323f5d0163cc12208eb8df5ace6f6
2018-04-13 14:14:36 -07:00
TreeHugger Robot
589bdcd1f6 Merge "Import translations. DO NOT MERGE" into pi-dev 2018-04-13 18:47:30 +00:00
TreeHugger Robot
72634cae72 Merge "Add optional metadata to specify icon's background color." into pi-dev 2018-04-13 17:48:22 +00:00
Bill Yi
7d0af513c0 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I4b4d9e11273bc8d2fa97a86e8f9b71d7c05f6b8c
2018-04-13 10:10:39 -07:00
HJ ChangLiao
bb6b64dfb4 Add new category key for ConnectDeviceFrag
For inject dynamic pref driving mode to
ConnectDeviceDashboardFragment,
Add a new category key for register it.

Bug: 72458929
Test: make RunSettingsLibRoboTests
Change-Id: Ifbbc8fc0f7b68ef68aff550851767a4f8ad7d9e6
2018-04-13 05:29:55 +00:00
TreeHugger Robot
3f9520e6f3 Merge "Fix the null check in LocalBluetoothProfileManager" into pi-dev 2018-04-13 00:20:16 +00:00
Fan Zhang
a8d23aafab Add optional metadata to specify icon's background color.
Bug: 77188317
Test: builds
Change-Id: Ic5e26c9caa8caa2e75fccc6de2c1f7130f28ad2c
2018-04-12 16:04:50 -07:00
Hansong Zhang
490d0201c4 Fix the null check in LocalBluetoothProfileManager
Check mHidDeviceProfile != null before invoking
mHidDeviceProfile.getConnectionStatus()

Bug: 77856868
Test: manual; run LocalBluetoothProfileManagerTest
Change-Id: If3cc7d55265e6734176044e97b32a44e7b1a1a62
2018-04-12 16:03:25 -07:00
Jovana Knezevic
ccb8eb3858 Merge "Adds user broadcasts to UserManagerHelper." into pi-dev 2018-04-11 22:20:33 +00:00
Jovana Knezevic
a512d304ca Merge "Separates current process user and foreground user" into pi-dev 2018-04-11 22:06:15 +00:00
jovanak
82029aedff Separates current process user and foreground user
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
2018-04-11 11:45:09 -07:00
jovanak
5e523fa378 Adds user broadcasts to UserManagerHelper.
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
2018-04-11 17:18:19 +00:00
timhypeng
e745e4acda Rename onProfileAudioStateChanged() to onAudioModeChanged()
* While receiving BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED
  and TelephonyManager.ACTION_PHONE_STATE_CHANGED intent dispath
  onAudioModeChanged() callback.
* Rename onProfileAudioStateChanged() to onAudioModeChanged()

Bug: 74134939
Test: Build
Change-Id: Iaf037110adba907721f7342eeef360e65cb1da34
2018-04-11 09:05:59 +00:00
TreeHugger Robot
0e675bd901 Merge "Exempt tests for hidden APIs." into pi-dev 2018-04-10 16:34:05 +00:00
Makoto Onuki
69ade35741 Merge "Once auto-battery saver is ever set, don't show suggestion" into pi-dev 2018-04-09 20:29:30 +00:00
TreeHugger Robot
e5b621a6af Merge "Allow 3 variants of icon size in TwoTargetPreference." into pi-dev 2018-04-09 19:04:22 +00:00
Andrew Sapperstein
52f70351f4 Update PreferenceCategory headers to use headline font.
Medium weight.

Bug: 70296667
Test: visual
Change-Id: I879f5524920050e0a12b094d8ad0e9bcf72fd24c
2018-04-08 14:13:43 -07:00
TreeHugger Robot
8ee96517d2 Merge "Register NetworkRequest callbacks with a handler" into pi-dev 2018-04-07 05:06:52 +00:00
Fan Zhang
874425d3f2 Allow 3 variants of icon size in TwoTargetPreference.
Bug: 77726902
Test: robotests
Change-Id: I2770e78827227edff28fcf7e9429c916780588b4
2018-04-06 16:59:38 -07:00
TreeHugger Robot
06d4cda1ac Merge changes from topic "hid-device-app-name" into pi-dev
* changes:
  Show Bluetooth HID Device connection status in Settings
  Bluetooth: Add hidden API to get current user of HID Device (1/3)
2018-04-06 22:23:39 +00:00
Makoto Onuki
5972773e47 Once auto-battery saver is ever set, don't show suggestion
Bug: 77228046
Test: manual test after adb shell settings delete secure suppress_auto_battery_saver_suggestion
Test: m -j ROBOTEST_FILTER=BatterySaverButtonPreferenceControllerTest RunSettingsRoboTests
Test: b ROBOTEST_FILTER=BatterySaverUtilsTest RunSettingsLibRoboTests
Change-Id: Ib224263dc20e7844b7a79fe175fde26c773bd05a
2018-04-06 14:58:14 -07:00
TreeHugger Robot
43470a309a Merge "Hearing Aid: change get/set active device (3/3)" into pi-dev 2018-04-06 20:45:21 +00:00
TreeHugger Robot
835e90b606 Merge "Import translations. DO NOT MERGE" into pi-dev 2018-04-06 20:40:31 +00:00
Erik Kline
04ed430cee Register NetworkRequest callbacks with a handler
Test: as follows
    - builds, flashes, boots
    - settings changes that cause the "x" to appear and disappear
      from the wifi icon don't crash
    - runtest frameworks-net passes (kinda no related)
Bug: 64133961
Bug: 77285360
Change-Id: I8af34d623ce265545a2ec42b56c5e87b4d077f58
2018-04-06 13:07:18 -07:00
TreeHugger Robot
919f606df9 Merge "Update battery strings to respect user 24 hour setting" into pi-dev 2018-04-06 18:17:11 +00:00
Lei Yu
8aab7c65ec Merge "Hide app if it shares uid with whitelisted app" into pi-dev 2018-04-06 17:19:19 +00:00
Nicolas Geoffray
b0284fb5de Exempt tests for hidden APIs.
Bug: 64382372
Bug: 74963051
Test: m
Change-Id: I5234dd6230f2bdd6ffccbf12b25a02d929d20161
2018-04-06 14:54:39 +01:00
Bill Yi
6b1a9fbc05 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I205d2d3cbd3c2af3e81e0c86836025e04fc451c9
2018-04-05 15:31:19 -07:00
Salvador Martinez
b9e8cfa5d3 Update battery strings to respect user 24 hour setting
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
2018-04-05 15:00:23 -07:00
Lei Yu
ae7686534e Hide app if it shares uid with whitelisted app
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
2018-04-05 13:49:45 -07:00
Amin Shaikh
ddcb7dfb5e Listen for bluetooth audio changes in system ui.
Update the connected state of bluetooth devices upon audio state
changes. This will increase the likelihood that the connected
state of all bluetooth devices are up to date.

Change-Id: I239626ca5241210b6ab82f60273a87c1863d1dbb
Fixes: 77498698
Test: manual
2018-04-05 14:27:36 -04:00
Hansong Zhang
dcae293e94 Show Bluetooth HID Device connection status in Settings
* Add the HidDeviceProfile class, which wraps the BluetoothHidProfile in
Settings. HidDeviceProfile will be added to local Bluetooth profiles
once the HID Device Service connection is in use. This will allow the
connection status of HID Device profile to be displayed in Settings >
Connected devices > Bluetooth > Device details, and in the device list.
* Rename InputDeviceServiceListener to HidHostServiceListener to
eliminate consufion.

Bug: 69136526
Test: apps with HID Device.
Change-Id: I99bef6745ae58fe7f522432e7841a5910388a352
2018-04-05 09:14:22 -07:00
Bill Yi
1442823fac Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I32c2b02c473f73f279bea8631709bab73090d1c2
2018-04-04 16:00:04 -07:00
Hansong Zhang
3b8f09b3c5 Hearing Aid: change get/set active device (3/3)
* setActiveDevice() returns false in error case, e.g. when the device is
not connected
* add getActiveDevices() instead of isActiveDevice(), which returns a list
that must have two elements: left and right, or empty list on error

Test: manual
Bug: 69623109
Change-Id: I48f3388c56434d0c21e09bd8b794e58848cd8794
(cherry picked from commit 8d799f8340)
2018-04-04 14:54:07 -07:00
Jovana Knezevic
c3724b5e91 Merge "Adding user accessor functions to UserManagerHelper." into pi-dev 2018-04-02 22:59:24 +00:00
Ryan Lin
a29957d518 Merge "Add callback onProfileAudioStateChanged()" into pi-dev 2018-03-31 06:23:26 +00:00