-Bottom divider is not showed when there are more than 7 devices exist in output switcher
-Check panel type in isDividerAllowedBelow()
-Hide the Slice bottom divider of Output switcher panel
-Show divider in panel layout only for output switcher panel
Bug: 159177275
Test: make -j42 RunSettingsRoboTests
Change-Id: I49396a0ee0543b494a2b3d714ec248ebab08e7ba
-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
-Add an extra padding in adapter for dedicated panels
-Add test cases
Bug: 154181365
Test: manual test
make -j50 RunSettingsRoboTests
"adb shell am start -a android.settings.panel.action.INTERNET_CONNECTIVITY"
Change-Id: I65bc26c23ca5a7f1b433c36ac7ddf1a658793719
Fixes: 124399577
Test: robolectric
adb shell am start -a android.settings.panel.action.WIFI
adb shell am start -a android.settings.panel.action.VOLUME
Change-Id: I9e13357444e4ebeee50fb8cc68fbc974ce5fffb6
SliceLiveData changed its behavior, if slice is null, it will not
notify LiveData observer but callback to onErrorListener. We only
reduce PanelSlicesLoaderCountdownLatch in LiveData observer.
Therefore the error slice caused PanelSlicesLoaderCountdownLatch
never count to 0, the UI was not displayed. It is solved by reducing
PanelSlicesLoaderCountdownLatch in onErrorListener and also not return
null in MediaOutputIndicatorSlice.
Test: manual
Fixes: 141084035
Change-Id: Iddb2dbdc0e0d2ac3e26071960bb667937f181121
Setup a max allowed num for PanelSlicesAdapter to prevent too
many slices showing in single panel.
Test: Manual verify
Test: atest PanelSlicesAdapterTest
Fixes: 129358092
Change-Id: I7b72a29489e597b8309d74841eaeab0fe42aace6
Settings Panels as a dialog have a default animation for entering the
screen, but Slices complicate the animation. While the dialog enters the
screen, Slices begin to bind, thus changing the height of the dialog as
it enters, causing perceived bounce / jank in the animation.
This CL is cherry-picked/based on ag/6671083 but do the following modification:
(See the original commit message for the whole concept)
When trying to load all the Slices, there are few possible situations:
1. Slice starts loading slowly, starting at state LOADED_NONE
2. Slice is loading in progress, having state LOADED_PARTIAL
3. Slice is loaded, but there's error return from the Slice data (We don't
need to show the Slice in this case)
4. Slice is loaded, progress to state LOADED_ALL
5. Slice starts from state LOADED_NONE, but never progress to the next state
because it crashes at setting backend.
Notice that there are two cases that the state will stay at LOADED_NONE and
we can't distinguish them.
Hence, we decide to do the following:
If Slice is with error (case 3) we remove the slice from the list and mark it
loaded.
If Slice is loaded with LOADED_ALL (case 4, which is the ideal case), we mark
it as loaded.
In the other cases, we fire a handler to mark the slice loaded anyway after
250ms timeout.
When all the slices are marked loaded (which should happen after 250ms timeout,
we will animate the panel out. Although there might be slices which are still
partial loaded, we can still have the slice in the panel once it is ready.
The panel might bounce/jank in this case, but at least it will still showing
correctly, and should show up smoothly in most cases.
The solution to this problem is twofold:
1. Load all Slices first
2. Create a custom animation to draw the panel once the recyclerview has
been laid out.
Test: Manual/Visual inspection
Test: make -j40 RunSettingsRobotests
Bug: 123942159
Change-Id: I639a707aa4ba3f906bd6f9752c92727aaba28142
Remove the divider above the media device switcher Slice per the request.
Do a little refactor in Panel View, to use DividerItemDecoration instead of adding
divider views in layout file as the recycler view items divider.
Since dividers should be shown in most cases, we are setting DividerCondition to
DIVIDER_CONDITION_BOTH and default true to allow divider. For the slice we don't
need divider (media device switch in this case) we are setting the the target
direction of isDividerAllowed (above in this case) to false. Since we have
DIVIDER_CONDITION_BOTH, if one of the item view set the divider not allow, the
divider won't be shown.
Test: Visual/Manual inspection
Fixes: 126205139
Change-Id: Ic857705c90819ef9375f877a44bb32987b5d4438
The 3 main categories are:
- Panel Opened
- Panel Closed
- Panel Slice interaction
There are 3 close events:
- See more button
- Done button
- Clicking outside the panel
Slice interactions will log the Uri of the Slice and the ActionType,
such as Toggle, Slider, Content (intent).
Change-Id: Iecad948f39f50dd12ae1bcb23a5d523e0df8bb98
Fixes: 117804231
Test: robotests
Add media output panel type to launch media output slice.
Bug: 121083246
Test: make -j RunSettingsRoboTests
Change-Id: Ibf706146430e309fef6cbf0e1e86c2d5b78b50d5
The resources available to tests are now exactly the merged resources
located in the APK under test.
Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
UI changes include:
- RecyclerView to host slices
- Font family to headline font
- Title is now centered
- Added SeeMore & Done buttons
- Horizontal Dividers between slices
- Indented Slices
- Landscape layout is fullscreen
Change-Id: I3549c847fc88edd81f670ddfa2907dd3741441e0
Screenshot: https://screenshot.googleplex.com/RzWktzOZJkc
Test: Robolectric
Test: Manual app
Bug: 118622007