- When SliceManager try to pinSlice, process may not have the permssion
yet, so in Androix lib it use try/catch to avoid Security exception.
However, if SliceManger quickly unpinSlice after pinSlice, process
may still not get the permission yet, then due to no security
exception, it cause the settings crash.
Bug: 283065718
Test: atest passed
Test: Manual test passed
Change-Id: I2293fca73e65dfaa34237abe57e0c6a3fe0f62bb
This CL before, onChanged(null) will cause PreferenceGroup
didn't update UI in ConnectedDeviceDashboardFragment.
This CL remove onChanged(null) and set unvisible of SliceView
in the constructor.
Bug: 142220754
Test: make -j42 RunSettingsRoboTests
Change-Id: Ib20db373430589c5c5efbe8a4c866b7fae4f3399
- Fixed by updating UI in mainthread
Fixes: 142241908
Fixes: 142220754
Test: manual test if it crashes again
Change-Id: Ia83b66d3e60201bc524dbfab69bdeaa5201d38c2
When it is null, we should also update SliceView, so SliceView can
update to be "invisible"
Fixes: 133790296
Test: RunSettingsRoboTests
Change-Id: I239405cce8bcadacbd374ccbb24d0fcbadc04880
Make sure setSliceUri is invoked even when it is null, where we create
SliceLiveData.
Then in lifecycle, if LiveData is not null, we will register observer.
Bug: 120803703
Test: Manual
Change-Id: I56caf2abf04c4a251ebafa5deb599d44b1c7fe92
If DashboardFragment detects blocker controllers, it won't display
until:
1. All blocking controllers finish bg works.
2. Timeout
This CL adds UiBlockerController to control this behavior and
BlockingSlicePreferenceController as an example.
Bug: 120803703
Test: atest SettingsUnitTests
Change-Id: I66fc194776d46ee49b3ec7685f3167834e673ba2
Reuse the PreferenceController and LayoutPreference however create
specific one for slice:
1. SlicePreference: container to inject slice view
2. SlicePreferenceController: handle updates for slice
Also add styles for it with default layout.
Bug: 120803703
Test: RunSettingsRoboTests
Change-Id: I6ab083ad57117e6198dcba37702a25213da78719