3365 Commits

Author SHA1 Message Date
Bill Yi
b5f9b4ebd5 Import translations. DO NOT MERGE
Change-Id: Ie6451c790960cd27a15cd0bf50cf78497cf60490
Auto-generated-cl: translation import
2018-09-08 16:29:41 -07:00
Fan Zhang
c18bf578af Merge "Fix issue with loading all apps." 2018-09-05 18:09:24 +00:00
TreeHugger Robot
a1a76a375c Merge "Remove mUsePbapPce and mUseMapClient" 2018-09-05 08:26:32 +00:00
TreeHugger Robot
4a64b0323a Merge "Revert "Add log for StringUtil"" 2018-09-05 03:13:37 +00:00
Doris Ling
270063c079 Fix issue with loading all apps.
- when we navigate across multiple pages that access the app state
session, the resumed state for the session may become incorrect, which
leads to things that depends on the flag not being run properly. In
onResume(), first force pause the session, so that it will be in the
correct paused state so that the resume tasks will be run.

Change-Id: I6c27c98226a8e0fe99d9b80f1f4297c45a49b612
Fixes: 113272571
Test: manual
2018-09-04 17:12:19 -07:00
Evan Laird
97eaacba10 Don't request profile owner as user if we don't have a valid user
ag/4891733 changed DevicePolicyManager#getProfileOwnerAsUser() to call
into DPMService.getProfileOwnerAsUser() instead of getProfileOwner(). It
turns out that getProfileOwnerAsUser doesn't accept invalid userIds but
the latter method did.

This CL guards against calling that method if we don't have a valid
userId. The calling code just wants to know if a profile is managed but
I'm pretty sure a UserRecord pointing at a non-user can't be managed.

Test: Expand QS, tap user switcher icon
Change-Id: Idfe46cb6c0d25ba3817ae3639f87de70bbce2d0b
Fixes: 113777483
2018-09-04 15:06:37 -04:00
Lei Yu
c6047d3cb7 Revert "Add log for StringUtil"
This reverts commit 1aedf0768c79c9c249a4f28b25179704b22224f7.

Reason for revert: <INSERT REASONING HERE>

Change-Id: Iad115dd31eaea573ee43163c8ab69a7d7140f543
2018-09-04 18:32:53 +00:00
Philip P. Moltmann
7a80e14184 Merge "Factor some RestrictedLockUtils out of SettingLib" 2018-08-31 04:47:28 +00:00
TreeHugger Robot
528ffcc310 Merge "Add log for StringUtil" 2018-08-30 21:10:32 +00:00
Philip P. Moltmann
4e615e6986 Factor some RestrictedLockUtils out of SettingLib
Also make the new lib only use system-apis.

This allows mainline module to use the new
RestrictedLockUtilsSettingLib.

Unfortunately the whole RestrictedLockUtils would have caused to much
new system-api. Hence it was split into RestrictedLockUtils and
RestrictedLockUtilsInternal. This caused a lot of trivial code changes.

Bug: 110953302
Test: Built
Change-Id: I693b3bf56f3be71f0790776e3aad5694717786ef
2018-08-30 11:59:29 -07:00
jackqdyulei
1aedf0768c Add log for StringUtil
Bug: 111694886
Test: Build
Change-Id: Icf7a57baa81a554bdbe7c1359d61d78abc77e0db
2018-08-30 11:14:24 -07:00
TreeHugger Robot
2256328250 Merge "remove getName() from CachedBluetoothDeviceManager" 2018-08-30 17:35:29 +00:00
Chienyuan
42a0d509bc Merge "Simply logic for connect and disconnect in HeadsetProfile" am: 7aae482135 am: 474e4f3163
am: 5ecc085bdc

Change-Id: I73f47ee6488fe05cfd3c86f006530659ecb5df70
2018-08-29 19:43:32 -07:00
Chienyuan
495cc1eb8e Merge "Remove connected device check logic in getConnectionState" am: 8593fc6c06 am: 9cc6c2aa2e
am: ea9afe031e

Change-Id: I8b95d85fa9f4fe88fba50086329fccb0f223016b
2018-08-29 19:31:03 -07:00
Chienyuan
5ecc085bdc Merge "Simply logic for connect and disconnect in HeadsetProfile" am: 7aae482135
am: 474e4f3163

Change-Id: I45ec4ad0a2128491356982898780e7046b8f5be3
2018-08-29 19:26:48 -07:00
Chienyuan
ea9afe031e Merge "Remove connected device check logic in getConnectionState" am: 8593fc6c06
am: 9cc6c2aa2e

Change-Id: I5307bfb1a0cc22213e80e5bb2563d1a1a24c9292
2018-08-29 19:21:46 -07:00
Chienyuan
474e4f3163 Merge "Simply logic for connect and disconnect in HeadsetProfile"
am: 7aae482135

Change-Id: I59e9d745d64f20e84dd888f3981290b9296f4815
2018-08-29 19:16:13 -07:00
Chienyuan
9cc6c2aa2e Merge "Remove connected device check logic in getConnectionState"
am: 8593fc6c06

Change-Id: I86b30d27d3d7ab35473e8710b100e5730dfa12a4
2018-08-29 19:12:37 -07:00
Treehugger Robot
7aae482135 Merge "Simply logic for connect and disconnect in HeadsetProfile" 2018-08-30 01:55:56 +00:00
Treehugger Robot
8593fc6c06 Merge "Remove connected device check logic in getConnectionState" 2018-08-30 01:55:27 +00:00
TreeHugger Robot
32ccdeae55 Merge "Remove BluetoothEventManager#setReceiverHandler" 2018-08-29 23:39:38 +00:00
TreeHugger Robot
3815dcbe9d Merge "Factor out HelpUtils into @SystemAPI lib" 2018-08-29 23:33:17 +00:00
Amin Shaikh
947f76d7a1 Remove BluetoothEventManager#setReceiverHandler
Make BluetoothEventManager fields final and remove the method to
unregister receivers unnecessarily (introduced in b/35415158).

Bug: 113122466
Test: runtest systemui && make RunSettingsLibRoboTests
Change-Id: I8f34ab1a809638959ab4096a829c72b3d1ac3a23
2018-08-29 17:19:58 -04:00
Treehugger Robot
cdf75c3cc8 Merge changes from topic "androidx-settings-aosp"
* changes:
  Migrated various apps under frameworks/base/packages/Shell  to androidx
  Migrated SystemUI & SettingsLib to androidx
2018-08-29 18:31:09 +00:00
Lei Yu
f1a35071bb Merge "Fix crash in CachedBluetoothDevice." 2018-08-29 17:14:03 +00:00
Philip P. Moltmann
51c6c4c2b8 Factor out HelpUtils into @SystemAPI lib
This is the first of a few sub-libraries that will get factored out of
the settings lib. These libs will be included by mainline modules which
are compiles against system-api.

Bug: 110953302
Test: Looked at UI
      m -j RunRoboSettingsLibTests
Change-Id: I16347e565aca554d6a8653df35765c2194479e78
2018-08-29 09:26:12 -07:00
Chienyuan
c129df807f Remove connected device check logic in getConnectionState
From current code, it will check if the device connected before
getConnectionState. We can remove this check logic because
HidHostService will do it.

Bug: 111812003
Test: manual - connect/disconnect HID keyborad from Settings UI
Change-Id: Ib512b3f15109b6f4cacf1f1c517b69d17ddd5ac4
2018-08-29 23:14:55 +08:00
Chienyuan
edd44ec292 Simply logic for connect and disconnect in HeadsetProfile
* connect: remove debug log of connect connected device. HeadsetService
  will check it and print related log.
* disconnect: remove connected device check logic. HeadsetService will
  check it.
* getConnectionStatus: remove connected device check logic.
  HeadsetService will check it.
* wrap if/else statement in curly brackets.

Bug: 111812003
Test: manual - connect/disconnect headset from Settings UI

Change-Id: I2c58362c236a26b38c8aa67eb3a3433d76f97e45
2018-08-29 20:40:06 +08:00
Dario Freni
b613c39cbe Merge "Include NOTICE from /product and /product_services" am: 17115bdb02
am: ccbda28785

Change-Id: I9a808e76f8d5432f98dc0b2ad34fc05367c0a936
2018-08-29 02:40:15 -07:00
Dario Freni
ccbda28785 Merge "Include NOTICE from /product and /product_services"
am: 17115bdb02

Change-Id: Iba47449f44e8ad4ef17f8b4c5bfb1b713e12a7da
2018-08-29 02:31:34 -07:00
Dario Freni
17115bdb02 Merge "Include NOTICE from /product and /product_services" 2018-08-29 09:12:52 +00:00
Dario Freni
5c9b74f527 Merge "Include NOTICE file from /product_services." 2018-08-29 09:12:39 +00:00
Fan Zhang
6f4cc2bdf5 Merge "Sort imports" 2018-08-29 00:19:53 +00:00
jackqdyulei
0e249a7a60 Fix crash in CachedBluetoothDevice.
In LocalBluetoothProfileManager, we will update profiles in constructor
by register service callback to bluetooth profiles. So the callback may
return before this constructor, in which case mBluetoothProfileManager
maybe null in LocalBluetoothMangaer.

This cl moves the updateLocalProfiles() out of the constructor, to make
sure we will first construct mBluetoothProfileManger and then connect to
bluetooth profiles.

Change-Id: I93a388cf0598555d26181a6b0da99dcb35f227dd
Fixes: 113290231
Test: RunSettingsRoboTests
2018-08-28 17:12:35 -07:00
Fan Zhang
f7802eacfd Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I9acb311ec05f72f0a37f08b0d26785841fe91de5
2018-08-28 15:16:58 -07:00
Aurimas Liutikas
b8616dc4d1 Migrated SystemUI & SettingsLib to androidx
Test: make SystemUI SettingsLib
Bug:76692459
Change-Id: I248fdf4042a0a97bc6349091da21c936c2d37c95
Merged-In: I248fdf4042a0a97bc6349091da21c936c2d37c95
(cherry picked from commit fd52c1433c4e4d3f53aef2454d03f6b58f2411a3)
(cherry picked from commit d366771e84f584330c21b6381c902518af110034)
(cherry picked from commit a14377a450a7172963ab7ec1b3e47444a3249216)
2018-08-28 14:19:51 -07:00
hjchangliao
5b02a33069 DO NOT MERGE: Cherry-pick misc fixes to AOSP
Remove wrapper for BluetoothA2dp

Remove BluetoothA2dpWrapper,
Use BluetoothA2dp to replace all of them.

Bug: 76167422
Test: RunSettingsLibRoboTests

Remove wrapper for LocationManager

Remove LocationManagerWrapper from SettingsLib

Bug: 76167422
Test: RunSettingsLibRoboTests
2018-08-28 12:38:44 -07:00
Aurimas Liutikas
a14377a450 Migrated SystemUI & SettingsLib to androidx
Test: make SystemUI SettingsLib
Bug:76692459
Change-Id: I248fdf4042a0a97bc6349091da21c936c2d37c95
Merged-In: I248fdf4042a0a97bc6349091da21c936c2d37c95
(cherry picked from commit fd52c1433c4e4d3f53aef2454d03f6b58f2411a3)
(cherry picked from commit d366771e84f584330c21b6381c902518af110034)
2018-08-28 11:51:13 -07:00
Fan Zhang
66aed6e8e6 DO NOT MERGE Remove old suggestion code.
Change-Id: I2ab9b32ea7622228b0d61b3a16f0695ab04597d7
Fixes: 110361022
Test: robotests
2018-08-28 17:29:29 +00:00
TreeHugger Robot
c8b7a4acfc Merge "Fix restricted switch layout for small screens" 2018-08-28 17:19:33 +00:00
Dario Freni
a1766a1b2d Include NOTICE from /product and /product_services
Test: flashed on a device and checked Legal information webview
Bug: 111179267

Change-Id: I322ddc6903c80840b6f5db7fb9623bfd02b02b40
Merged-In: I5b88fd1c311011300e7db0f010a64150993ba52d
2018-08-28 18:11:26 +01:00
Dario Freni
8440d2a2cf Include NOTICE file from /product_services.
Bug: 111179267
Test: verified on a device with a module installed on /product_services.
Change-Id: Ic4bab3dc33062a7d5b4b5cd883c22602ff822e45
2018-08-28 18:08:05 +01:00
TreeHugger Robot
83e094d2e3 Merge "Show bonded devices in "Pair new device"(1/2)" 2018-08-28 14:32:04 +00:00
Aurimas Liutikas
d366771e84 Migrated SystemUI & SettingsLib to androidx
Test: make SystemUI SettingsLib
Bug:76692459
Change-Id: I248fdf4042a0a97bc6349091da21c936c2d37c95
Merged-In: I248fdf4042a0a97bc6349091da21c936c2d37c95
(cherry picked from commit fd52c1433c4e4d3f53aef2454d03f6b58f2411a3)
2018-08-27 22:41:10 -07:00
SongFerng Wang
b7cc5351c0 Merge "Refactor SystemUI and add function in settingslib for service state" 2018-08-28 02:40:02 +00:00
Antony Sargent
8744ed3a05 Fix restricted switch layout for small screens
The support library Preference class has code which hides the reserved
space for icons on small screens when there is no icon, but it expects
the icon container to have the id 'icon_frame', and our custom layout
was using a different id.

Bug: 111318404
Test: visual (set display size to Larger or Largest, and visit Developer
options; the Stay awake and OEM unlocking switches should be aligned the
same as other preferences without icons)

Change-Id: I1b5ac43851d77b87fe01f8267bb50ea23086e262
2018-08-27 14:37:25 -07:00
Ash_Chen
ff54d93d6e Show bonded devices in "Pair new device"(1/2)
Some users forgot they had paired devices and couldn't see their BT device
when they search device in "Pair new device". (b/80382940, b/80133137).
Need to change the behavior to let paired devices can be shown on "Available devices".

Bug: 111738593
Test: Bluetooth Pairing Test
Change-Id: Iff0b40e422230fca9a3287bba4a3c4c7c4ce9cc0
2018-08-27 10:35:50 +08:00
Bill Yi
035197f7b4 Import translations. DO NOT MERGE
Change-Id: I67649a68baa20fd9a0cb531be7b1dec62399205e
Auto-generated-cl: translation import
2018-08-25 15:01:47 -07:00
timhypeng
dd1c592fcd Remove BluetoothDevice.ACTION_DISAPPEARED from SettingLibs
- this was only for Android Ice Cream Sandwich

Bug: 112115770
Test: make -j42 RunSettingsLibRoboTests
Change-Id: I6c2b87529af7e6a7123cde8141fbdb9d1822ec9f
2018-08-24 05:47:21 +00:00
SongFerngWang
8cfb4d59a9 Refactor SystemUI and add function in settingslib for service state
To make behavior consistent in the long run and refactor the code
into settingslib and call it from both Settings and SystemUI.

Bug: 110973964
Test: run testcase as below:
1. frameworks/base/packages/SettingsLib: -> ALL PASS
make RunSettingsLibRoboTests -j40
2. frameworks/base/packages/SystemUI: -> ALL PASS
atest frameworks/base/packages/SystemUI/tests/src/com/android/systemui
/statusbar/policy/NetworkControllerSignalTest.java

Change-Id: Ie8899dd5398a503b861557c222bbd93bd2049d10
2018-08-24 10:56:02 +08:00