- Replace the left menu button with "Turn off/on Wi-Fi"
- Remove the TurnOnWifiSlice
- Show "Wi-Fi is off" sub-title when Wi-Fi is disabled
- Remove the "Wi\u-Fi is turned on" sub-title when APM is on.
Bug: 188710392
Test: manual test
atest -c InternetConnectivityPanelTest
make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.panel
Change-Id: I53e200f6cadf8b712bf794bcbd5ff79f0f239cc0
- Show progress bar when Wi-Fi scanning
- Show "Searching for networks..." sub-title when Wi-Fi scanning
- Remove "Wi-Fi" from searching networks string
Bug: 178774497
Test: manual test
atest -c InternetConnectivityPanelTest
make RunSettingsRoboTests ROBOTEST_FILTER=PanelFragmentTest
Change-Id: Ic05b939bef3b106845fe90db41eb09f0e15756f4
- Add "Airplane mode is on" to sub-title
- Set the header layout to CENTER_HORIZONTAL if it's no icon
- Hide "Settings" button
- Screenshot
https://screenshot.googleplex.com/6m5dFVZu7ar4nKW
Bug: 178717651
Test: manual test
atest InternetConnectivityPanelTest \
PanelFragmentTest \
ProviderModelSliceTest
Change-Id: I899a817fd99415e9cad608aa4deac1e45365696a
Bug: 176871139
Test: build Test and manaual test(check the UI)
make RunSettingsRoboTests -j ROBOTEST_FILTER=InternetConnectivityPanel
(PASS)
Change-Id: I5e601c6639d979ca776f4bdf7f5e870a0513c7f5
-Redirect for Cast button
-Send intent when call MediaOutputPanel::create()
-Return null to finish the activity
Bug: 172178632
Test: make -j50 RunSettingsRoboTests
Change-Id: I1038e237113f433c847aff98a45b1dd6089d80a8
- This CL before, output switcher panel will show default
icon if there are no media session or album art.
This CL will hide the icon if there are no media session
or album art.
- Add test case
Bug: 161495909
Test: make -j42 RunSettingsRoboTests
Change-Id: I5f80158b12f89c8499fb97d0b203ebeffefbc18b
Re-launching volume panel continuously will trigger an endless panel
loading, show a transparent unfinished UI, and then block the user's
screen.
Root cause:
When the activity receives a new intent from user's clicking, it will
call PanelFragment#createPanelContent to update the current fragment.
The method triggers an animation and then loads the panel content. If
multiple invocations run concurrently before the animation or the
loading finish, the loader's countdown latch will be increased
abnormally and lead to the endless loading.
Solution:
1. Since the invocations are in UI thread, simply add a flag to avoid
reentrance when the panel is animating or loading.
2. Filter out the same panel's creation request when the panel is still
visible.
3. Do not force a panel's recreation when it's under construction.
Bug: 143889510
Bug: 160491854
Test: robotest, manual
Change-Id: I821faedeb62354929f3af9804cbbe44ee5bb8a53
-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
1. only make the output switcher tall enough to show 6.5 devices
2. enlarge album art to 52*52 and keep same size on group panel
3. reduce panel header top padding
4. enlarge slice first item top padding
5. update slider bar right padding
6. update panel height
7. align slice title item left with panel title icon
8. enlarge slice end item right padding
Bug: 156045699
Test: manual test
Change-Id: I51321d98ef483665689b7e258d6071df76382759
The sound panel and media panel are using the same window, so when it
transit from the sound panel to media panel, no window-change event will
be sent. Therefore, Talkback won't be able to re-focus the panel header
which lead to the lack of the announcement.
Fix this by adding setAccessibilityPanelTitle() to trigger Talkback.
Fixes: 140459762
Test: rebuild and test talkback on the media output panel.
Change-Id: I1442434315374dbbfe1d47ca8638180577c93168
Since panel activity is singleInstance, a newer panel will reuse the
same fragment as the previous panel when they are displayed one after
another.
Panel fragment has two kinds of exclusive header layout which shouldn't
be showed at the same time, so we have to reset their visible states
when creating panel content.
Fixes: 154668079
Test: robotest
Change-Id: I701a7cde4b43322fbc63ae1cb74c41dd23b37c0c
- This CL update customize button title when
onCustomizedButtonStateChanged() is called.
- Add test case
Bug: 152002708
Test: make -j42 RunSettingsRoboTests
Change-Id: I85c9cf90305757e279c058db2875e303b4add437
When updating the panel after getting a second intent to the
activity, there is a small window of opportunity for the user
to close the activity before the animation ends, causing an
NPE when onFinish is called as the activity already closed down.
This change will check that there is an activity before trying
to finish it.
Bug: 150322041
Test:
For an easy way to reproduce this, turn the screen on and run the
following in a terminal:
while true; do adb shell am start -a \
android.settings.panel.action.INTERNET_CONNECTIVITY; \
sleep 0.1; done
Then press the back button while the screen is attempting to
display the fragment. There should be no Settings crash.
Change-Id: I4ca831d71a7221a7a4a62bb29e802f507ce5213c
-Rename PanelCustomizedButtonCallback to PanelContentCallback
-Add onGroupChanged in PanelContentCallback
-Add test cases
Bug: 146813761
Test: make -j42 RunSettingsRoboTests
Change-Id: I60888efbbd0fc2878467418e55c70887a9d3f405
This CL add a customize button to stop casting when media
is transferred to info device.
This CL include following change:
- Add new methods to PanelContent.java. Let panels to
customize "see more button".
- MediaOutputPanel will check which device is used to
transfer media currently. The customize button will
shown on when transfer device is info device.
Then user can use this button to stop casting.
- Add test case.
Bug: 147856563
Test: make -j42 RunSettingsRoboTests
Change-Id: I8b201a10339f39f1d938d99b5659a82014e5bb89
-title shows artist
-subtitle shows album
-add test cases
Bug: 147776885
Test: make -j42 RunSettingsRoboTests
Change-Id: Ib33e5550e668d8cc5d70051ea2e7dd74d61c767a
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
Only add divider in recyclerView once or more and more dividers
will be set in recyclerView.
Change-Id: I765ed888d460be221341dafe3521a849b8dd3889
Fix: 139452947
Test: Show panel many times and see the divider.
Set panel launch mode to singleInstance to avoid panel can show up
infinite time when user keep launching panels (Easy repro by
pressing volume hard key > settings again and again).
After changing launch mode to singleInstance, we will need to do
some refactors, to avoid weirdness when adding/changing/closing
panels:
1. Move and refactor logic in SettingsPanelActivity#onCreate.
We will need onNewIntent here to handle Panel launching, since
we only have one instance of SettingsPanelActivity now.
Also do refactor here to reuse the PanelFragment instead of
creating one every single time, to better handle the exit
animation, avoid janky exit behavior from the old PanelFragment
2. Move logic from PanelFragment#onCreateView, to reuse it when
updating panel content.
Also add exiting animation when we are transitioning the panel
from one to another. Also add alpha animation to make it move
more smoothly.
3. Adding flags to launch see more intent in settings.
Fixes: 131225920
Fixes: 131254399
Test: manual
Change-Id: I93d3708bd02a2d736e38685475f2d9988ef62d31
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
The old logging only include see_more, done, and clicked_out when hiding
the panel page. We were missing many cases that user might use back
button, app switch button to close the page.
Update the hide page keys to change the clicked_out to others to
include all the other cases which hide the page.
Test: Manual verification
Test: atest PanelFragmentTest SettingsPanelActivityTest
Fixes: 130169553
Change-Id: Icede9a8dcb84565cba183963c9fb554507631c98
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
Move getActivity() call and fetching of metrics feature provider into
onCreateView rathre than the Constructor of the fragment (where Activity
is not yet created).
Test: manual
Test: existing robotests
Fixes: 128808444
Change-Id: I88586b0ca3ebda60f8933041322541cc5911de68
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