Commit Graph

16 Commits

Author SHA1 Message Date
Alan Huang
b9be27b006 [VolumePanel] Fix the Hearable control slice uri parameter
The provided uri doesn't contain the formatted string, so just append
the width at the end

Bug: 229048602
Test: make -j64 RunSettingsRoboTests
Change-Id: Idadbb4d725c8ca65bac31fbead8ac1d429ebcea9
2022-06-09 08:22:33 +00:00
Alan Huang
dceda96854 [VolumePanel] Add Hearable control slice in VolumePanel
Bug: 229048602
Test: make -j64 RunSettingsRoboTests
Change-Id: Ia799a805594803a9a014eef76bb3db5a50a13524
2022-05-20 09:02:10 +00:00
Michael Groover
911f7e7aa9 Add unaudited exported flag to exposed runtime receivers
Android T allows apps to declare a runtime receiver as not exported
by invoking registerReceiver with a new RECEIVER_NOT_EXPORTED flag;
receivers registered with this flag will only receive broadcasts from
the platform and the app itself. However to ensure developers can
properly protect their receivers, all apps targeting T or later
registering a receiver for non-system broadcasts must specify either
the exported or not exported flag when invoking #registerReceiver;
if one of these flags is not provided, the platform will throw a
SecurityException. This commit updates all the exposed receivers
with a new RECEIVER_EXPORTED_UNAUDITED flag to maintain the existing
behavior of exporting the receiver while also flagging the receiver
for audit before the T release.

Bug: 161145287
Test: Build
Change-Id: Ie97372efebd8258d9a4c503771d55109a85e6ae9
2021-12-09 20:34:02 -08:00
timhypeng
a7a73c4c92 Rename MediaOutputSliceConstants to MediaOutputConstants
-Slice is not used and it is better to remove the slice string

Bug: 165772904
Test: build pass
Change-Id: I38b26187f03509d0d9f5cdb8ef30f3f3ef8779d8
2020-12-24 01:07:24 +00:00
timhypeng
eee759ea29 Update rule of launching media output dialog
-Do not hide Media Output Dialog in Settings, and let dialog handles
-Hide Media output slice panel when launching dialog

Bug: 155822415
Test: make -j50 RunSettingsRoboTests
Change-Id: I16732f625f100b259d6e53c85db40af0ec1652c5
2020-10-08 16:29:28 +08:00
timhypeng
3084d063f3 Update OutputSwitcher from MediaOutputSlice to MediaOutputDialog in Settings
-Update entry point at media indicator in volume panel
-Update entry point at remote media slice in volume panel
-Update entry point at remote volume group in Sound Settings
-Update entry point at media output preference in Sound Settings
-Hide Media output dialog when the caller is not active

Bug: 155822415
Test: make -j50 RunSettingsRoboTests
Change-Id: Ib6c86067522925c439f336644e4d027dbae3379c
2020-10-08 16:18:43 +08:00
Tim Peng
db7d61d0a2 Adjust layout for Slice InputRange
-Make title to slider aligned
-Add test cases

Bug: 147462114
Test: make -j50 RunSettingsRoboTests
Change-Id: Ib1d076f77eae75e4f861a80873117b6254729fe5
2020-03-09 21:50:58 +08:00
Tim Peng
3405c3dfa9 Change volume panel title from "Volume" to "Sound"
Bug: 150337735
Test: manual
Change-Id: Icc457c2c1aae21282261549de47eeaf9c7219887
2020-02-27 08:11:39 +00:00
timhypeng
b266fa6029 Add remote media slice in volume panel
-Add test cases

Bug: 142772656
Test: make -j42 RunSettingsRoboTests
Change-Id: I62d3054a4343ed2c7fbb0b4d7aeb5a48da194b02
2020-02-06 14:38:13 +08:00
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
Lei Yu
c1dbd34b9d Add remote volume slider conditionally.
Issue before this CL:
RemoteVolumePreferenceController only return available when
it is casting, otherwise return CONDITIONALLY_UNAVAILABLE.
However slice database only index available controllers and keep
this cache. So remote slider won't be indexed if it is not casting
at that time.

As a tmp fix, this CL make controller always return available
unsearchable to make it indexed by database. However only add
that slice if it is casting.

Bug: 130124950
Test: RunSettingsRoboTests
Change-Id: I191144844d6ba7ccbe3dc1c9d19801adb978abc6
2019-04-15 13:49:46 -07:00
hughchen
6feb55546d Sound + Output Switcher on Volume Slice
- Show "play media to" item when Previously Connected device is available
- Click "Play media to" to launch output slice
- Update test case

Bug: 127729340
Test: make -j50 RunSettingsRoboTests
Change-Id: Ic00b309f87bc16f540b22b5a43fecb86f76caeb2
2019-03-16 07:04:43 +08:00
jackqdyulei
dd00274967 Add SliceWorker for remote volume controller
Also update some methods to fix issues in panel.

Bug: 126199571
Test: RunSettingsRoboTests
Change-Id: I9b93ae594d41cb71b984b06267161455373bf121
2019-03-06 11:31:40 -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
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
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