Commit Graph

3508 Commits

Author SHA1 Message Date
Weng Su
258483bff3 Cache Wi-Fi state in worker thread
- The WifiManager.getWifiState() is a blocking API, It may not be
  suitable for use on the UI thread.

- To avoid blocking the UI thread, we should cache the Wi-Fi state
  from the WIFI_STATE_CHANGED broadcast to return immediately.

Bug: 226039078
Test: manual test
make RunSettingsLibRoboTests ROBOTEST_FILTER=WifiStateWorkerTest

Change-Id: Ia0443824975f01099e52f777c15468f30285f4c1
2022-04-20 01:52:34 +00:00
SongFerng Wang
6d7970c9cd Merge "[LE_Broadcast] Add more APIs for the broadcast profile" into tm-dev 2022-04-19 08:01:41 +00:00
SongFerngWang
04a6e834c6 [LE_Broadcast] Add more APIs for the broadcast profile
- Modify the Start API and Stop API
- Add the ProgramInfo, BroadcastCode, AppSourceName, BroadcastId
- Add the BluetoothLeBroadcast.Callback

Bug: 227511707
Test: build pass
Change-Id: I2a14bd16b39f11adbcaad63db128ab44ff9dc9da
2022-04-19 05:50:26 +08:00
Meng Wang
fbbecbd49b Revert "Use getPhoneNumber API to get phone number on T"
This reverts commit 35b45a774d.

Reason for revert: Some carrier require to see SIM phone number in Settings UI. Revert for now and need to think of a better UI.

Bug: 228424584
Bug: 159459637
Test: build and manual test
Change-Id: I9381f7cdc6343a2e3b886d58f732587a2c8d8b7e
2022-04-18 11:54:05 -07:00
Weng Su
5e8f4a3eb9 Fix broken test in WifiEnterpriseRestrictionUtils
- The original design would result in NPE if the user did not have any
  restrictions.

- Refine to use UserManager#hasUserRestriction instead of
  UserManager#getUserRestrictions.

Bug: 229350205
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiSettingsTest
make RunSettingsLibRoboTests \
  ROBOTEST_FILTER=WifiEnterpriseRestrictionUtilsTest

Change-Id: Iec60e3a1c2778fc89596b3c4d28a34604adfdfb8
2022-04-15 19:16:16 +08:00
Zoey Chen
fdfa0593f3 Merge "[LeAudio] New Broadcast dialog UI" into tm-dev 2022-04-15 04:22:49 +00:00
Sunny Goyal
6f25f3e0fe Revert "Change version checks to use SdkLevel.isAtLeast*"
Revert "fix broken build on erorrprone"

Revert submission 17730702-fixErrorProneBuild

Reason for revert: Breaks Launcher3 unbundled build by using hidden library in main Launcher code
Reverted Changes:
Id0ce4d308:Change version checks to use SdkLevel.isAtLeast*
I8fc801b00:fix broken build on erorrprone

Change-Id: I8e9a80dd9e9f79c30635cc6be8e3efb2ebbf42af
2022-04-14 14:49:24 -07:00
Zoey Chen
0247dddee5 [LeAudio] New Broadcast dialog UI
Screenshot: https://hsv.googleplex.com/6085874472189952

Bug: 228415131
Test: manual
Change-Id: I25d75f61b3cc18dd57b5417e83f403b028a3d510
2022-04-14 15:05:40 +00:00
kholoud mohamed
caa0302ef4 Change version checks to use SdkLevel.isAtLeast*
Bug: 229190745
Test: m -j out/soong/.intermediates/frameworks/base/packages/SettingsLib/SettingsLib/android_common/lint/lint-baseline.xml
Change-Id: Id0ce4d3089af4e9a8a9002e79c810caac5e711e2
2022-04-14 14:06:55 +01:00
Peter Kalauskas
5c011d09c9 Merge "Remove user icon avatar from memory when unlocked" into tm-dev 2022-04-11 17:05:14 +00:00
TreeHugger Robot
01f7e54f19 Merge "Specify whether or not the disconnected string should be used" into tm-dev 2022-04-08 22:21:02 +00:00
Peter Kalauskas
5bf13fa999 Remove user icon avatar from memory when unlocked
Previously, the bitmap for the user icon would stay in memory even when
the phone was unlocked. Now, the bitmap is cleared whenever the phone is
unlocked to save memory. This change only affects the user-icon shown on
the lockscreen next to the clock.

Bug: 202868702
Test: KeyguardQsUserSwitchControllerTest
Change-Id: Iec6a57adb65181fcef65489c248db77930f566bb
2022-04-08 14:26:12 -07:00
Evan Laird
035a025262 Merge "Show 4G LTE and 4G LTE+ data connection type" am: c5fbfeb8f5 am: aad97149d8 am: 6000d95598
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1934942

Change-Id: If1c2aa050430daec1e1f8658de64527fecf7f0fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 16:06:39 +00:00
Evan Laird
6000d95598 Merge "Show 4G LTE and 4G LTE+ data connection type" am: c5fbfeb8f5 am: aad97149d8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1934942

Change-Id: Ifd438f93c65d828e44b1c4608b6ba81e66d433c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 15:37:34 +00:00
Evan Laird
aad97149d8 Merge "Show 4G LTE and 4G LTE+ data connection type" am: c5fbfeb8f5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1934942

Change-Id: I2ec744fd7e823951bb5b8ae756ae3f596e41bfa0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 15:21:05 +00:00
Evan Laird
c5fbfeb8f5 Merge "Show 4G LTE and 4G LTE+ data connection type" 2022-04-08 15:05:57 +00:00
Weng Su
ffe902c1df Add DISALLOW_CHANGE_WIFI_STATE user restriction
- New DISALLOW_CHANGE_WIFI_STATE user restriction is supported from T

Bug: 203168097
Test: manual test
make RunSettingsLibRoboTests \
  ROBOTEST_FILTER=WifiEnterpriseRestrictionUtilsTest

Change-Id: I7912a68a538197469836f208b5354f4ec4d122cd
2022-04-07 11:46:47 +08:00
Caitlin Cassidy
0db54b283e Merge "[Media SASS] Use the device's address to fetch the full MediaDevice information so that we display the correct icon." into tm-dev 2022-04-05 18:16:03 +00:00
TreeHugger Robot
e35d11225a Merge "Prevent exfiltration of system files via user image settings." into sc-dev am: be7735efcb am: 5b62c51502 am: 8c10a6aa0d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17071224

Change-Id: I100fd497b19a8cad113c7d9320c1e64212502896
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-01 15:25:20 +00:00
TreeHugger Robot
8c10a6aa0d Merge "Prevent exfiltration of system files via user image settings." into sc-dev am: be7735efcb am: 5b62c51502
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17071224

Change-Id: I892a79e6b627eb1e8e58007613a5855b7e74250a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-01 15:06:37 +00:00
TreeHugger Robot
5b62c51502 Merge "Prevent exfiltration of system files via user image settings." into sc-dev am: be7735efcb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17071224

Change-Id: Ib7bf62ea0ad68e3a104d426f7f1d912597cc471e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-01 14:46:51 +00:00
Zoey Chen
db7058fabe [LeAudio] Create QR code scanner activity and fragment
hsv: https://hsv.googleplex.com/6255792371007488

Bug: 214340362
Test: manual
Change-Id: I254b7d1b7191686da4c1ca7cd2eb980ab8606c4e
2022-04-01 17:00:42 +08:00
SongFerngWang
548388f7ee LE_Broadcast New LeBroadcast and Assistant at ProfileManager
1. LocalBluetoothLeBroadcast implements the LocalBluetoothProfile.
2. LocalBluetoothLeBroadcastAssistant implements the LocalBluetoothProfile.
3. LocalBluetoothProfileManager new the LocalBluetoothLeBroadcast and
the LocalBluetoothLeBroadcastAssistant

Bug: 227511707
Test: build pass
Change-Id: Ia8932b97192603a3c7d1e06d8f97eb3158c05b45
2022-03-31 21:19:05 +00:00
Zoey Chen
3f1ee56bd0 [LeAudio] New QR code scanner UIs and modify local API
Bug: 214340362
Test: manual
Change-Id: I6f654d808dbcb92c99eaad9507b6328a80a0d5f4
2022-03-30 23:06:18 +08:00
Alex Stetson
a9aeb9c448 Specify whether or not the disconnected string should be used
Bug: 214440184
Test: manual
Change-Id: I969da545e90450f64527a8abf23d1ac89b4b238d
2022-03-30 00:12:54 +00:00
TreeHugger Robot
525ddc37e4 Merge "[LeAudio] Move the QrCamera and decorateView from Settings to SettingsLib for Wifi and BT" into tm-dev 2022-03-29 06:33:46 +00:00
Zoey Chen
1ecdf9225c [LeAudio] Move the QrCamera and decorateView from Settings to SettingsLib for Wifi and BT
Bug: 214340362
Test: Manual test
Change-Id: I0d10c9e34cfaeeb0f3cf1f0a2acbfda0cce0df13
2022-03-28 04:52:49 +00:00
Chaohui Wang
ed22b6e105 Set placeholder summary for SettingsInjector
Currently, injected service could return null or empty string for summary, but it could cause settings item shift around on phone.
Use a not empty placeholder string could solve this issue.

Bug: 183471902
Test: On Pixel Phone
Change-Id: I14538f4038c5ddbf45b6d42ad0c00bab487e835a
2022-03-25 23:08:51 +08:00
Betty Chang
22333f1c03 Merge "Move the QrCodeGenerator from Settings to SettingsLib for Wifi and BT" into tm-dev 2022-03-24 08:21:16 +00:00
Caitlin Cassidy
684fcdf7e9 [Media SASS] Use the device's address to fetch the full MediaDevice
information so that we display the correct icon.

Bug: 223517312
Test: atest MediaDeviceManagerTest, MediaMuteAwaitConnectionManagerTest
Change-Id: If09dce8b2cec5cdd223c46050385ab0aab522d4b
2022-03-23 20:05:15 +00:00
changbetty
db1e3583cf Move the QrCodeGenerator from Settings to SettingsLib for Wifi and BT
Bug: 214338905
Test: Manual test
Change-Id: I51151d71b89a92fe6880a00ead490adeb14f20bb
2022-03-23 10:30:46 +00:00
shaoweishen
2cafe393b7 [Output Switcher] Modify ranking rule
1. make Phone with higher ranking
2. add new state with "selected" for cast device

Test: Verified on device
Bug: 224870434
Bug: 224780609
Change-Id: Ief19cf0946f6df1193c0ed3e09e76ea60bfea07c
2022-03-23 06:51:53 +00:00
Shaowei Shen
463ff8dbb8 Merge "[Output Swithcer] Add groupable routes when build list" into tm-dev 2022-03-23 06:34:28 +00:00
Yasin Kilicdere
c20089e4be Merge "Singularization of duplicated multi user strings." into tm-dev 2022-03-22 19:04:58 +00:00
Zoey Chen
a8233b6210 [LeAudio] Add LocalBluetoothLeBroadcast and LocalBluetoothLeBroadcastAssistant
Test: manual
Bug: 222676140
Change-Id: I7b7ecb087b08aeaec9d8035fd490b40e273d8c90
2022-03-22 06:55:17 +00:00
Zoey Chen
8764c4115b [LeAudio] Add LocalBluetoothLeAudioContentMetadata and LocalBluetoothLeBroadcastMetadata
Test: manual
Bug: 222676140
Change-Id: I3722ce537cc6e2b8a85d6390a432881e7fccef87
2022-03-22 06:54:33 +00:00
shaoweishen
27187d8767 [Output Swithcer] Add groupable routes when build list
This change should only take effect when there's any route which is
groupable but not transferrable.

Bug: 223614810
Test: Verified on device
Change-Id: I39a1047ec7e607835b8998672b94f39f9c2c30b7
2022-03-22 00:28:22 +00:00
Yasin Kilicdere
625a463b8f Singularization of duplicated multi user strings.
Many multi-user strings were duplicated between SettingsLib, Settings,
System UI and Car projects. This CL removes those duplicates.

List of singularized strings: "Guest", "New user", "Add new user?",
"When you add a new user....", "Add user", "Remove guest?",
"Too many incorrect attempts...."

Bug: 191386817
Test: NA
Change-Id: I3689cfdbc3e0fc2f6a773941d044d8b32a762e88
2022-03-21 14:57:50 +00:00
TreeHugger Robot
faaf198328 Merge "API Review: add UNBOND in EXTRA_REASON name" into tm-dev 2022-03-19 06:36:59 +00:00
Kholoud Mohamed
a8e9aa390d Merge changes from topic "apiFeedback" into tm-dev
* changes:
  RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
  RESTRICT AUTOMERGE move device policy resource APIs to a separate class
  RESTRICT AUTOMERGE hide device policy resources constants
2022-03-19 06:30:43 +00:00
kholoud mohamed
b7aedc6f3d RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
Bug: 217388602
Bug: 218875965
Test: atest EnterpriseResourcesTests
Test: manual
Change-Id: I8af03136e67057d171e97cb5a43187aa6c7f4fe7
2022-03-19 00:22:17 +00:00
TreeHugger Robot
dbfe88eed4 Merge "Fix the Settings crash when resetting network" into tm-dev 2022-03-18 17:30:44 +00:00
Kholoud Mohamed
3d31e0b93b Merge changes from topic "resetAPIs" into tm-dev
* changes:
  RESTRICT AUTOMERGE add requiresAPI annotation for DPM#getString
  RESTRICT AUTOMERGE Expose getString APIs as public
2022-03-18 16:07:22 +00:00
Weng Su
2be1842da2 Fix the Settings crash when resetting network
- The issue device is not supported the Telephony feature which will
  cause related sub-funcions to be unavailable.

- If there has no Telephony feature supported, then bypass related
  sub-functions.

- Use the same solution for Wi-Fi feature related sub-functions.

Bug: 223747479
Test: manual test
make RunSettingsLibRoboTests \
  ROBOTEST_FILTER=ConnectivitySubsystemsRecoveryManagerTest

Change-Id: I17b9728c7dc2ee836bf2653922b47ff66afa7857
2022-03-18 00:47:17 +08:00
kholoud mohamed
d782127f6f RESTRICT AUTOMERGE add requiresAPI annotation for DPM#getString
Bug: 218875965
Test: N/A
Change-Id: I54e679e52584898ddee7d364bf37af24517d7908
2022-03-17 14:45:52 +00:00
Etienne Ruffieux
0410f9b91c Merge "[API Review] Replace usage of getUuids by new SystemApi" am: e2b00d3a7d am: 1de1157d4e am: 520a6e5a9b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2020438

Change-Id: I20adac33682b4647fd1906f80dbed55a4476325c
2022-03-17 11:00:34 +00:00
Etienne Ruffieux
520a6e5a9b Merge "[API Review] Replace usage of getUuids by new SystemApi" am: e2b00d3a7d am: 1de1157d4e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2020438

Change-Id: Ie10cd534ac9a245903c1674445ef9eb17de97daf
2022-03-17 10:59:16 +00:00
Etienne Ruffieux
e2b00d3a7d Merge "[API Review] Replace usage of getUuids by new SystemApi" 2022-03-17 09:44:51 +00:00
Oli Lan
1892bc12c2 Merge "Add a delay between the photo picker and the crop UI." into tm-dev 2022-03-17 09:28:26 +00:00
SongFerng Wang
be4ecfc58e Merge "Add the API to get the AudioLocation" am: 919194578b am: 78d86dc33b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2027930

Change-Id: I4293eb1b67ae754b0b5515309267651b9355a708
2022-03-17 04:59:47 +00:00