Commit Graph

9 Commits

Author SHA1 Message Date
lindatseng
2943c1de7a Set panel launch mode to singleInstance and fix animation
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
2019-05-10 07:14:13 +00:00
lindatseng
79957c3217 Update panel logging to include all hide page cases
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
2019-04-12 11:33:41 -07:00
hughchen
e13e09d1b4 Update output switcher behavior and UI design
- Remove media stream stuff, use active device info as header.
- Show the sub title of media device.
- Add new requirement, when user click disconnected bluetooth device,
  will auto connceted it.
- When bluetooth state is off, do not showing content of slice.

Bug: 127201385
Test: make -j42 RunSettingsRoboTests
Change-Id: Ie1880ba3ef9910a42caf0cca2b6502e54787f5a0
2019-03-11 11:44:27 +08:00
Matthew Fritze
b197110f71 Add logging for SettingsPanels
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
2019-02-13 16:06:24 -08:00
hughchen
2177813531 Add entry point to launch media output slice
Add media output panel type to launch media output slice.

Bug: 121083246
Test: make -j RunSettingsRoboTests
Change-Id: Ibf706146430e309fef6cbf0e1e86c2d5b78b50d5
2019-01-28 12:02:08 +08:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
Matthew Fritze
735d6ef195 Move Panel to public API
Change the SettingsPanelActivity to reference the
public API.

Bug: 117804442
Test: robolectric, manual app
Change-Id: I4b128ae9d97c1000fdaa0c3fb5b94f8dc096055f
2018-12-13 13:58:07 -08:00
Matthew Fritze
c999b088d2 Add Volume panel
Volume panel hosts each volume stream, including:
- Media volume
- Call Volume
- Ring volume
- Alarm volume

Change-Id: I1801d10d2304c57615e9499386c638c74ffcd7c3
Screenshot: https://screenshot.googleplex.com/m764j65ECto
Bug: 117804161
Test: Manual app
Test: robolectric
2018-12-03 11:26:58 -08:00
Matt Fritze
90899e08f0 First commit for settings panels
Establish the Activity which hosts Settings panels through the
PanelFragment. The Activity's purpose is to validate the intent
data coming in, including:
- Called with startActivityForResult (so we can log who is calling)
- Intent has the proper intent extra to link to a Panel

The fragment takes the Panelable data and builds a Settings Panel.
Each panel will have:
- Title
- List of Slices
- Link to underlying content

The Panelable interface is created to provide all of those datums, and
the new FetureProvider provides the Panelables by linking them with
keys. The keys will eventually become public APIs with CTS tests.For
now, we store them locally.

I included an exmaple panel, the InternetConnectivityPanel which
currently shows Wifi and Airplane mode.

Screenshot: https://screenshot.googleplex.com/c6sv7ZzQ5OJ
Bug: 117804089
Test: make -j40 RunSettingsRobotest
Test: Manual app
Change-Id: I1932f7179cc32088acd6413a736901ddf9651892
2018-11-26 15:26:02 -08:00