Commit Graph

11304 Commits

Author SHA1 Message Date
markchien
6d2c010891 Get entitlement configuration from intent extra
Tethering resource configuration is move from framwork to tethering
module. The resource would not be accessible from outside of tethering
module.
List the replacements of framework resources usage and intent extra:
1. R.string.config_mobile_hotspot_provision_response
    --> android.net.extra.TETHER_PROVISIONING_RESPONSE.
2. R.string.config_mobile_hotspot_provision_app_no_ui
    --> android.net.extra.TETHER_UI_PROVISIONING_APP_NAME
3. R.array.config_mobile_hotspot_provision_app
    --> android.net.extra.TETHER_SILENT_PROVISIONING_ACTION
Besides, the current active subId would put in
android.net.extra.TETHER_SUBID

Note: They are not APIs because of API freeze. Now both tethering module
and Settings define these strings independently. Will replace hard code
string as tethering module-lib APIs in b/159085857.

Also move the entitlement response intent registeration from onCreated
to onStartCommand, this can avoid wrong intent registeration if subId
changed between onCreate and when the intent arrived.

Bug: 146918263
Test: atest TetherServiceTest
      atest TetherProvisioningActivityTest

Change-Id: I3d06df01302a9c1f0893712d9250fe394dc66588
Merged-In: I3d06df01302a9c1f0893712d9250fe394dc66588
2020-06-19 23:21:17 +08:00
markchien
dfd8d235a1 Replace ConnectivityManager as TetheringManager
Tethering APIs are all move to TetheringManager from Android R.
1. Replace ConnectivityManager tethering API usage as TetheringManager.
2. Use TetheringManager#stopTethering to disable usb tethering instead
of using deprecated ConnectivityService#setUsbTethering
3. Use TetheringManager#stopTethering to disable bluetooth tethering
instead of directly use BluetoothPan#setBlueoothTethering. So bluetooth
getProfileProxy is not needed in TetherService because tethering would
do that when calling #stopTethering.
4. Also support TETHERING_ETHERNET entitlement check that
TETHERING_ETHERNET is new added from Android R.

Bug: 146918263
Test: atest TetherServiceTest
Change-Id: Id969f29d7210f2ee32719c76439049bbc86cd4f6
Merged-In: Id969f29d7210f2ee32719c76439049bbc86cd4f6
2020-06-19 23:05:27 +08:00
markchien
500ce1d4c8 Remove schedule recheck logic from TetherService
This change just remove unused code.
Tethering no longer ask TetherService to schedule recheck
(use #EXTRA_SET_ALARM) from Android Q. Intead Tethering
(EntitlementManager) would schedule the recheck by itself.

This change is necessary in order to move the resourcesout
of the framework because TetherService needs to know when
it need to re-run entitlement recheck from framework res
(config_mobile_hotspot_provision_check_period).

Bug: 146918263
Test: atest TetherSerivceTest
Change-Id: Ie45859c19b96d0689c45dd610501fae0506742ff
Merged-In: Ie45859c19b96d0689c45dd610501fae0506742ff
2020-06-19 23:04:43 +08:00
Mark Chien
c3a501c02e Merge "Remove unused resource from TetherServiceTest" into rvc-dev am: 45a953b56c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11908542

Change-Id: I89a1b4747662611dc2a103ab6835afff0e05086b
2020-06-19 05:45:18 +00:00
TreeHugger Robot
25a8c13254 Merge "Remove the feature flag of contextual home V2" into rvc-dev am: e8e4e4bafc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11910083

Change-Id: I3da9493dff22054dd6250a17d8ea6ed7a5226457
2020-06-19 05:44:59 +00:00
Mark Chien
45a953b56c Merge "Remove unused resource from TetherServiceTest" into rvc-dev 2020-06-19 05:43:36 +00:00
TreeHugger Robot
e8e4e4bafc Merge "Remove the feature flag of contextual home V2" into rvc-dev 2020-06-19 05:06:12 +00:00
markchien
efb029c067 Remove unused resource from TetherServiceTest
TetherService is no longer query resource by itself after ag/11524847.
That CL miss to remove unused getResources code.
Now remove unused resource in this change.

Bug: 146918263
Test: atest TetherServiceTest
Change-Id: I3b0da2672246997aee16b11576ce5ae9bfe596dc
2020-06-19 03:37:38 +00:00
Jason Chiu
d489acb2e3 Remove the feature flag of contextual home V2
Bug: 159393461
Test: robotest & rebuild
Change-Id: If5f030b4c8bd5ef61bb722da9ae7f3ace0ac6e0e
2020-06-19 11:23:57 +08:00
TreeHugger Robot
8006681905 Merge "Update notification subtext" into rvc-dev am: 141153e789
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11920342

Change-Id: I27cc9ca8a606be820f8c4a3c9f3dd6af95f0388b
2020-06-19 01:16:49 +00:00
Beth Thibodeau
13f3e8f04b [DO NOT MERGE] Add toggle for media resumption
Adds a toggle under Settings > Sound > Media to toggle media resumption

Bug: 154039093
Test: manual
Test: atest SettingsProviderTest
Test: make -j40 RunSettingsRoboTests ROBOTEST_FILTER="MediaControls"

Change-Id: I803c57031bc3252cab35c06ea124d1c22a3c3aeb
2020-06-18 23:58:34 +00:00
Julia Reynolds
03a42fd844 Update notification subtext
Test: atest
Fixes: 159274325
Change-Id: Iff98b4b056bf7a3c6386063d6588a26607ee7525
2020-06-18 16:25:38 -04:00
Jason Chiu
e623f69f29 Merge "Fix the overlapping problem of the burst of slice updates" into rvc-dev am: 251b98492f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11837792

Change-Id: Iaa2d45ff44dbf212886085bcee4433b7e4402886
2020-06-18 11:23:49 +00:00
Jason Chiu
251b98492f Merge "Fix the overlapping problem of the burst of slice updates" into rvc-dev 2020-06-18 11:06:42 +00:00
Jason Chiu
0625bb4815 Fix the overlapping problem of the burst of slice updates
Implement a throttle in SliceBackgroundWorker to control slice updates.

Test: robotest
Fixes: 152366832
Change-Id: I8b65d1b57973e036b932172627aca506f4fae3a4
2020-06-18 02:18:38 +08:00
TreeHugger Robot
f6afc2658f Merge "Add new Always on display slice" into rvc-dev am: 16e1cd296a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11736609

Change-Id: Id5ec044f6f29ecee29e9efad075eeeaa38d7fa10
2020-06-17 12:14:51 +00:00
TreeHugger Robot
16e1cd296a Merge "Add new Always on display slice" into rvc-dev 2020-06-17 12:04:21 +00:00
Edgar Wang
e1186254d4 Add new Always on display slice
Currently we create Always on Display slice through
AmbientDisplayAlwaysOnPreferenceController. However, as the Always on
Display is merged into Idle lock screen, the conversion won't work
properly anymore when devices support the aware sensor.

Hence, we create another custom slice for this purpose.

Bug: 145920511
Test: manual & robotest

Change-Id: Ifd90e2de5219bd4e97aa13b5855fdab95ff6c4d0
2020-06-17 07:52:01 +00:00
Mark Chien
9b626fce11 Merge "Get entitlement configuration from intent extra" into rvc-dev am: 481816a97d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11524847

Change-Id: I496104d3aff4f6937cf4445c7b0eef272d12e5df
2020-06-17 06:24:22 +00:00
Mark Chien
481816a97d Merge "Get entitlement configuration from intent extra" into rvc-dev 2020-06-17 06:07:52 +00:00
markchien
e22bd7a2e8 Get entitlement configuration from intent extra
Tethering resource configuration is move from framwork to tethering
module. The resource would not be accessible from outside of tethering
module.
List the replacements of framework resources usage and intent extra:
1. R.string.config_mobile_hotspot_provision_response
    --> android.net.extra.TETHER_PROVISIONING_RESPONSE.
2. R.string.config_mobile_hotspot_provision_app_no_ui
    --> android.net.extra.TETHER_UI_PROVISIONING_APP_NAME
3. R.array.config_mobile_hotspot_provision_app
    --> android.net.extra.TETHER_SILENT_PROVISIONING_ACTION
Besides, the current active subId would put in
android.net.extra.TETHER_SUBID

Note: They are not APIs because of API freeze. Now both tethering module
and Settings define these strings independently. Will replace hard code
string as tethering module-lib APIs in b/159085857.

Also move the entitlement response intent registeration from onCreated
to onStartCommand, this can avoid wrong intent registeration if subId
changed between onCreate and when the intent arrived.

Bug: 146918263
Test: atest TetherServiceTest
      atest TetherProvisioningActivityTest

Change-Id: I3d06df01302a9c1f0893712d9250fe394dc66588
2020-06-17 05:47:17 +00:00
Amy Hsu
12471d9484 Merge "Add Smooth Display option to developer in Settings" into rvc-dev am: f9a021511e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11544217

Change-Id: I06f91490e2adea3e9e3347790036730eec4a3ace
2020-06-15 08:46:02 +00:00
Amy Hsu
f9a021511e Merge "Add Smooth Display option to developer in Settings" into rvc-dev 2020-06-15 08:39:26 +00:00
Mark Chien
52a3551a7a Merge "Replace ConnectivityManager as TetheringManager" into rvc-dev am: 2aa2b0a2f8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11770823

Change-Id: I50a9ff0710db37ae8513afbf876b3e7ca83fa787
2020-06-15 06:40:10 +00:00
Mark Chien
10ef08d80f Merge "Remove schedule recheck logic from TetherService" into rvc-dev am: 49b74e24d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11524846

Change-Id: I4e08cfb19cf7600ed8bdd42675152e518446e541
2020-06-15 06:39:59 +00:00
Mark Chien
2aa2b0a2f8 Merge "Replace ConnectivityManager as TetheringManager" into rvc-dev 2020-06-15 06:23:28 +00:00
Mark Chien
49b74e24d6 Merge "Remove schedule recheck logic from TetherService" into rvc-dev 2020-06-15 06:23:11 +00:00
SongFerng Wang
58d36c2d48 Merge "Revert "Mainline: removed legacy UI for network selection mode."" into rvc-dev am: 518ffd7c76
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11837795

Change-Id: If6fbc2d5b6e82fedbb3f41ce7c11301491fd0c70
2020-06-15 03:12:27 +00:00
SongFerng Wang
518ffd7c76 Merge "Revert "Mainline: removed legacy UI for network selection mode."" into rvc-dev 2020-06-15 03:09:21 +00:00
Yanting Yang
af13156dea Merge "Update App info behavior for mainline module" into rvc-dev am: 8357871465
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11822585

Change-Id: I5852891ae326e0e88c184f94b46f5d9ff9134aa1
2020-06-15 03:07:05 +00:00
TreeHugger Robot
d452bfdfdc Merge "NetworkRequestDialog: Exit the dialog on connect failure" into rvc-dev am: eac45c6a89
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11852224

Change-Id: I95f0cda2c92101ea746916cee813f0a2d56d2ac2
2020-06-15 03:06:26 +00:00
Yanting Yang
8357871465 Merge "Update App info behavior for mainline module" into rvc-dev 2020-06-15 02:59:13 +00:00
TreeHugger Robot
eac45c6a89 Merge "NetworkRequestDialog: Exit the dialog on connect failure" into rvc-dev 2020-06-15 02:52:27 +00:00
Roshan Pius
924e9e39c1 NetworkRequestDialog: Exit the dialog on connect failure
Connection failure (similar to connection success) is the end of the
processng of a request. We should dismiss the dialog on connection
failure.

Bug: 158844146
Bug: 158616070
Test: Manual tests - Simulate connection failure and ensure that the
dialog vanishes with a toast.

Change-Id: I625ca76298ed549dbed76d398aea0c957c9102fc
Merged-In: I625ca76298ed549dbed76d398aea0c957c9102fc
2020-06-14 15:19:30 +00:00
Jason Chiu
6eca50ddf0 Merge "Fix Slice not pinned error" into rvc-dev am: 8cbee49d28
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11833849

Change-Id: Iba28857a715609cb332f9f50884a4de9ba81e5cb
2020-06-12 11:43:24 +00:00
Jason Chiu
8cbee49d28 Merge "Fix Slice not pinned error" into rvc-dev 2020-06-12 11:31:23 +00:00
SongFerng Wang
c3703cb4fe Revert "Mainline: removed legacy UI for network selection mode."
This reverts commit 521ebeafd3.

Reason for revert: to fix b/157880043

Bug: 157880043
Test: test legacy UI. PASS
Change-Id: I4116457a1f7fc0a3be142671c5d0439cd6bdf11d
2020-06-12 19:03:54 +08:00
tim peng
de8b0ada5f Merge "Output switcher panel requires large title icon for Slice slider style" into rvc-dev am: c21406a0a2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11818502

Change-Id: I62a7dfd8d9693d15eb6cf6012418c3ba5cc1efd1
2020-06-12 05:10:37 +00:00
tim peng
c21406a0a2 Merge "Output switcher panel requires large title icon for Slice slider style" into rvc-dev 2020-06-12 04:58:04 +00:00
Tim Peng
27b0ef6eb3 Output switcher panel requires large title icon for Slice slider style
-Add "VIEW_TYPE_SLIDER_LARGE_ICON" to be a new panel type which would enlarge its title icon
-Set "VIEW_TYPE_SLIDER_LARGE_ICON" to MediaOutputPanel and MediaOutputGroupPanel
-Extend slider style and add customized icon size
-Add test cases

Bug: 157208551
Test: make -j42 RunSettingsRoboTests
Change-Id: I9b4de4aa552e8b26e766411f7eff93ea1a2d1910
2020-06-12 11:22:17 +08:00
Jason Chiu
f7afded1d1 Fix Slice not pinned error
Slices should be pinned before being bound. The original design calls
registerSliceCallback() to pin a slice, and then calls bindSlice() and
passes the result to the callback directly. When the callback is
called, it executes unregisterSliceCallback() and unpins the slice.

However, registerSliceCallback() starts to observe the slice change and
then rebind it in an AsyncTask. If the slice is updating via its
background worker and the timing of the binding overlaps the callback
execution, it's possible to bind the slice right after unpinning it and
causes the error.

The solution is to remove the callback mechanism, and just to pin, bind
and unpin the slice directly.

Fixes: 157387583
Test: robotest
Change-Id: I8748dd3038a3662599935f07420d07cf254a4073
2020-06-12 04:14:46 +08:00
TreeHugger Robot
b299d90b7f Merge "Don't pass channel info for the bubble app page" into rvc-dev am: d6081039c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11636410

Change-Id: I88d711322b1b3ea5f4e50f534bab68e7a5b17b96
2020-06-11 17:36:29 +00:00
TreeHugger Robot
d6081039c6 Merge "Don't pass channel info for the bubble app page" into rvc-dev 2020-06-11 17:23:56 +00:00
markchien
17feecffae Replace ConnectivityManager as TetheringManager
Tethering APIs are all move to TetheringManager from Android R.
1. Replace ConnectivityManager tethering API usage as TetheringManager.
2. Use TetheringManager#stopTethering to disable usb tethering instead
of using deprecated ConnectivityService#setUsbTethering
3. Use TetheringManager#stopTethering to disable bluetooth tethering
instead of directly use BluetoothPan#setBlueoothTethering. So bluetooth
getProfileProxy is not needed in TetherService because tethering would
do that when calling #stopTethering.
4. Also support TETHERING_ETHERNET entitlement check that
TETHERING_ETHERNET is new added from Android R.

Bug: 146918263
Test: atest TetherServiceTest
Change-Id: Id969f29d7210f2ee32719c76439049bbc86cd4f6
2020-06-11 23:36:59 +08:00
Mady Mellor
87e16f416f Don't pass channel info for the bubble app page
Fixes: 157485149
Test: make SettingsUnitTests; adb shell am instrument etc
Change-Id: If8d9b446ed056996cda91fcc5e92c7077ff3ea5d
2020-06-11 08:33:45 -07:00
markchien
257b9bcdfa Remove schedule recheck logic from TetherService
This change just remove unused code.
Tethering no longer ask TetherService to schedule recheck
(use #EXTRA_SET_ALARM) from Android Q. Intead Tethering
(EntitlementManager) would schedule the recheck by itself.

This change is necessary in order to move the resourcesout
of the framework because TetherService needs to know when
it need to re-run entitlement recheck from framework res
(config_mobile_hotspot_provision_check_period).

Bug: 146918263
Test: atest TetherSerivceTest
Change-Id: Ie45859c19b96d0689c45dd610501fae0506742ff
2020-06-11 23:28:49 +08:00
András Klöczl
cfe3027432 Merge "Change user setup prompt dialog showing logic" into rvc-dev am: f8754b4deb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11686951

Change-Id: I56ac089933167479e20ccdb731e5b506dfbbbf48
2020-06-11 09:01:25 +00:00
András Klöczl
f8754b4deb Merge "Change user setup prompt dialog showing logic" into rvc-dev 2020-06-11 08:47:07 +00:00
Yanting Yang
62b15ac669 Update App info behavior for mainline module
As requested by framework team, the mainline module should be considered
as system apps and not stoppable and disable-able. Since many of these
modules provide critical functionality, disabling them can result in a
very unstable device.

According to the request, Settings will apply below changes to App info
page for protecting mainline modules:
- Hide "Force stop" and "Disable" in App info.
- Disable "Clear storage" and "Clear cache" in "Storage & cache".

Since the mainline module checking API interface changed, also change
the dependent files and test cases.

Fixes: 156955322
Test: robotest and verify "Cell Broadcast Service" in App info
Change-Id: Ibc239bdaf3364eda541a33add382364cfdc6fc9b
2020-06-11 13:04:55 +08:00
TreeHugger Robot
c3d70d2942 Merge "Add app icons to leasee view in shared data dev options." into rvc-dev am: 6647ac93d4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11817586

Change-Id: I4a2da8d9003dc7ced1bfa830b3424bb74fe0c4b6
2020-06-10 07:53:18 +00:00