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
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
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
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
Also disable clicking the header view and list items in the same view.
Bug: 156671006
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SharedDataPreferenceControllerTest
Test: manual (visual)
Change-Id: I2821bc6cdc523097283ab44b864088278850be53
- Extract user setup prompt dialog creation logic
- Move user setup prompt dialog showing to UserDetailsSettings
- Rename user click and creation related methods to improve readability
- Set "disabled by admin" for switch pref when switch is disabled
- Cleanup UserSettings and UserDetailsSettings onPreferenceClick
- After a guest is created the details page opens instead of switching
Test: Manual test and robo tests with this command:
make -j64 RunSettingsRoboTests
Demo: http://shortn/_ACYsnbIKO9
Bug: 156867277
Change-Id: Ifa0cdefcd49d5b865e940a7cc332136ed26ecf57
Don't filter out apps have don't have any usage events -
the package's notifications are still blocked
Test: atest, and verify that the packages match the 'blocked
count' subtext on the previous screen on an affected device
Fixes: 158343184
Change-Id: Iac01708849e3ae0b82f97db679ce512fc9675a17
- The "Smart Lock" item is a trust agent which comes from
TrustAgentManager, so add it to dynamic index.
Fixes: 148867137
Test: manual test the search result and run Settings robotest
Change-Id: I7cd3a9df89a9b9378fa49cc2cb2127c778b795f2
- This CL add a new method setSeekBarStateDescription() to set
the state of seek bar. Because in some case the description of
seek bar is not align progress of seek bar.
- Add test case
Bug: 157629483
Test: make -j42 RunSettingsRoboTests
Change-Id: I432e6f9deef59756b0a41244d50aaada1ddac6a9
1. Add percentile tags.
2. Fill 0 to avg, max, min and percnetiles when we detected result array
not equals to TEST_TIME.
3. Write error message to log when above situation occurred.
Test: atest SettingsPerfTests:LaunchSettingsTest
Change-Id: I2fe72a9289d8d2c6cccd6ae52156df3b31934516
Browsers are explicitly treated outside the web link infrastructure, so
we shouldn't offer "Open by default" section.
Fixes: 129162570
Test: robotests
Change-Id: Ie63d5fbfb32eaed4bba8a80158b6bb19bb45b380
This reverts commit 9546b7fdcb.
Reason for revert: This CL will have side effort, when switch from "USB tethering" to "MTP/PTP/Midi" mode, DUT will jump to "No data transfer".
Revert this CL and have good solution to address b/154933817
Bug: 156318036
Test: build pass
Change-Id: Ia79b7a9f5d71c15244b147f5ef26af47c1c1fc7c