Commit Graph

43 Commits

Author SHA1 Message Date
Fan Zhang
242da31179 Fix logging spam in DashboardFragment.
When updating preferences managed through PreferenceController, the
fragment should skip prefs that are not available.

Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I2f9b6ddf8c78d40068dc18f07e60672dcba4474a
2016-10-25 17:14:47 -07:00
Fan Zhang
5b6478a349 Add swipe to see notification to "Notification preferences"
Bug: 31799948
Test: RunSettingsRoboTests
Change-Id: Ib892ca4d5596c1c89e1efaf636a3eefd7cee371a
2016-10-24 15:33:12 -07:00
Doris Ling
a902a5bd93 Ensure that the gesture animation video is paused properly. am: 4245ad4771 am: 5e4fce04fb
am: 12ffd7aaa7

Change-Id: I5c063fc4c1644a9d7e5360e91c1d79375f92986a
2016-10-21 23:51:21 +00:00
Doris Ling
4245ad4771 Ensure that the gesture animation video is paused properly.
Add the handling to pause the animation video when user navigates away
from the gesture settings.

Test: Manual - play gesture animation videos, then switch to another app
in recents. Verifies from logcat that NuPlayerDriver is not active.
Fix: 32064123

Change-Id: I3d0fb3946e4d0d77a686aa97cfabe667862cac17
2016-10-21 14:28:54 -07:00
Adrian Roos
2bd8835fda Separate ambient display triggers am: 82829ee0b1 am: 5ba2074e31
am: c0dfa153f4

Change-Id: I2eed4a8bfbc8ded0f5d12b3284d8ae5a0cfb1823
2016-10-18 22:27:31 +00:00
Adrian Roos
82829ee0b1 Separate ambient display triggers
Allows configuring notification and sensor triggers
separately. Introduces a helper class that hosts the
logic for determining what kinds of triggers a device
supports.

Bug: 32073185
Change-Id: Ie7e8eb6b895dcc54e6f972e70642c7248b9e223a
Test: disable "ambient display", sensor triggers should still work
2016-10-17 14:05:53 -07:00
Doris Ling
99238ff174 Add static preview images to gesture settings. am: 12e4bebabf am: df7b815980
am: fccee6adae

Change-Id: Ia745f80fa47a7316cb462918f900de001b1ecf03
2016-10-17 20:31:49 +00:00
Doris Ling
df7b815980 Add static preview images to gesture settings.
am: 12e4bebabf

Change-Id: I4f5f16b109c4997b15b93320945bbb3ccab06735
2016-10-17 20:18:30 +00:00
Doris Ling
ec5314f2f5 Merge "Add static preview images to gesture settings." into nyc-mr1-dev 2016-10-17 20:11:31 +00:00
Doris Ling
dc9f6c71be Remove pickup gesture settings if sensor is not found. am: 94e0da52fc am: 79aa718669
am: ef980e4dd1

Change-Id: I6d5ee494b26838f0c508f297a28a18ccc1867422
2016-10-12 00:47:37 +00:00
Doris Ling
12e4bebabf Add static preview images to gesture settings.
Set the animation preview image view to the newly added preview image
instead of loading it from animation video.

Test: manual - launch gesture settings and visually check the animation
preview images.

Bug: 31636637

Change-Id: If25a0e3501bea0c6343326a143d665ec79e3d7c7
2016-10-11 16:44:58 -07:00
Doris Ling
94e0da52fc Remove pickup gesture settings if sensor is not found.
Update gesture settings to check for available pickup sensor before
showing pickup gesture settings.

Test: manual - launch gesture settings on different device and check for
pickup preference. Auto test pending.

Bug: 32072298

Change-Id: Iaab0290dcfeb2b0c9195df685f225d092a658347
2016-10-11 14:23:59 -07:00
Doris Ling
c037ed5bdb Add condition check for double tap gesture settings. am: c8b7555fc9 am: 7f62890cad
am: a5eb66eb01

Change-Id: I0d56e0b1e3b25bd589fcfd4ba2301d51369f217e
2016-10-07 18:15:40 +00:00
Doris Ling
c8b7555fc9 Add condition check for double tap gesture settings.
Only shows the double tap gesture preference if the config is enabled.

Test: manual - launch gesture settings on different devices and check
for double tap preference. Auto test pending.
Bug: 31930457

Change-Id: Id972f60035d0c74f0832395f0229691cd3296d60
2016-10-04 15:31:58 -07:00
Doris Ling
430025c4d6 Split Ambient Display settings. am: 1ad58d0abf am: f89766dbab
am: 0dfe46fe58

Change-Id: I33ffaa71c09cff7a4df496c42371519367e1772c
2016-09-24 00:35:24 +00:00
Doris Ling
f89766dbab Split Ambient Display settings.
am: 1ad58d0abf

Change-Id: Ie47c7504728bb225214ee8c348af8a154cb5a1f2
2016-09-24 00:05:17 +00:00
TreeHugger Robot
4f8a703d51 Merge "Split Ambient Display settings." into nyc-mr1-dev 2016-09-24 00:00:05 +00:00
Doris Ling
1ad58d0abf Split Ambient Display settings.
1. Reverting the changes for Display->Ambient Display; this setting
   will control incoming notification pulse.
2. Added 2 separate entries in gestures settings to control pick up
   and double tap gestures-triggered pulsing for Ambient Display.
3. Added automated tests to verify the preference initializes to the
   correct default value, and also verify that toggling the preference
   updates the corresponding settings correctly.

Test: make SettingsTests

Bug: 30595437
Change-Id: I125bf75fc4ccfea126a00ffae4207fcb789f487a
2016-09-23 15:33:37 -07:00
Doris Ling
b1a2417fe9 Use default switch preference view if gesture animations video is not available. am: 08886a0e91 am: 38693095e3
am: 7c8de075d8

Change-Id: Icd2dd9b1f58c0957d651742dab16b291afcd750c
2016-09-23 22:07:04 +00:00
Doris Ling
08886a0e91 Use default switch preference view if gesture animations video is not
available.

Check to see if animation video is available. If so, use the customized
view. Otherwise, use the default switch preference layout.

Test: make and run SettingsGoogleTests

Bug: 30701118
Change-Id: I0b25f41f8425b92834b45f706690648fb35a885d
2016-09-20 16:34:04 -07:00
Doris Ling
d0c7de09f0 Re-enable Ambient Display double tab. am: fec320324c am: 6bc8858379
am: 5d4c701707

Change-Id: I01c2e3a4a207f0338744228171a0cee7ff6bfbab
2016-08-27 00:33:28 +00:00
Doris Ling
fec320324c Re-enable Ambient Display double tab.
Restoring the changes to move Display->Ambient Display to Moves->Quick screen

This reverts commit 9b3000d8ac, except for
the removal of res/raw/gesture_ambient_move_lift.mp4

Test: Manual - Go to Settings->Display->Quick screen check and verify
the preference is restored.

Bug: 30595437
Change-Id: Ie50bcebd119714d49422b7139d0d0234f27584e2
2016-08-26 14:46:03 -07:00
Fan Zhang
e668afed14 Merge "Use isOemUnlockEnabled to drive oem unlocking toggle." into nyc-mr1-dev am: 2c8178db3a am: a9d2aa8dfa
am: 77ba0620ea

Change-Id: I7a557b4ce9923b7d9b3bd2add8c02fdbadfe589d
2016-08-24 16:18:02 +00:00
Doris Ling
008ba4ec40 Fix animation video render issue when Settings->Moves is resumed from
screen off.

Re-initialize the animation video if necessary when the preference is
visible to the user.

Fixes: 31023261

Test: manual -
1. Go to Settings -> Moves and verify that the animation video are
displayed correctly on load.
2. Press power button to turn screen off, then on again. Verify when
Moves settings resumes, the animation video is displayed correctly.
3. Repeat #2 above but let display time out instead of turning off
screen by power button.

Change-Id: I0ee21d23a4c402b3a8463dca3b36fce67d651993
2016-08-23 16:08:34 -07:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Doris Ling
9b3000d8ac Revert change to move Display->Ambient Display to Moves->Quick screen
check.

1. Add back original toggle for Display->Ambient Display and revert
summary text.
2. Remove Moves->Quick screen check preference and related scroll logic.
3. Remove ambient display related animation videos

Bug: 30686297
Change-Id: Ie01a201f0a8deb0a858bc2a7f9cc607b749ab6e4
2016-08-05 11:36:33 -07:00
Doris Ling
d59fcc94be Update UI for gesture settings.
1. Add list divider between each gesture preference
2. Increase top-padding from 16dp to 24dp
3. Move fingerprint swipe preference to the top of the list
4. Change default value for fingerprint swipe to OFF.

Bug: 30416729
Change-Id: If0a6ee080defb2e3dbd36fbda6e047c23a1b1026
2016-07-28 13:54:14 -07:00
Doris Ling
de991f457d Get gestures animation preview image in async loader.
When user scrolls in Gestures Settings, the textureview used for the
animation video will be destroyed if the view is scrolled outside the
screen. When the view is scrolled back in, a slight flicker is seen as
the animation video is not instantly made available on the new surface
texture. We are now retrieving the preview image in an async loader
after the preference is created, so that it will not delay the original
loading of the gestures settings page, but the preview will be made
available while we initialize the animation video in the new surface
texture.

Bug: 29790087
Change-Id: I83f4a5bc4f24b7aab4c0cc851cb524c10e74f328
2016-07-20 18:13:55 -07:00
Doris Ling
c2733db43f Merge "Fix janky scrolling for Gestures Settings." into nyc-mr1-dev 2016-07-19 20:30:12 +00:00
Doris Ling
ffb87f7e2a Add Gestures settings to search index.
Add GestureSettings class to the resource map of
SearchIndeSearchIndexableResources so that the preferences in the
gestures settings will be indexed and showed up as search result.

Bug: 30169776
Change-Id: I51be9e82dc8bce93e2abd13b48ceb3cd051cbcf4
2016-07-19 11:45:03 -07:00
Doris Ling
9345e4b3b6 Fix janky scrolling for Gestures Settings.
1. Move the media player initialization/cleanup to construstor and
onDetach() of GesturePreference correspondingly, so that it's only
done once instead of every time when a new texture surface is available.
2. Pause the animation video when user scrolls.

Bug: 29790087
Change-Id: I51e6a787f9f2964b6bfc5288f7f5af801ccecc31
2016-07-18 18:13:55 -07:00
Doris Ling
6b1a2a8cc8 Add handling for gesture settings for double twist for camera flip.
Add handling for updating the secure settings for camera double twist
when user updates the on/off toggle, and move
SYSTEM_NAVIGATION_KEYS_ENABLED from Global to Secure.

Bug: 29869445
Change-Id: Iebb937509a661b012688a3eb36efe08d2292ff26
2016-07-08 10:37:16 -07:00
Doris Ling
9a3cf7725b Fix layout transition from Display->Ambient Display to Gestures
1. Add handling in Gestures settings to scroll to the corresponding
preference when launching from Display->Ambient Display
2. Remove the bitmap creation for the video preview image
3. Use a custom aspect ration framee layout to hold the animation
instead to avoid resizing of the animation view.

Bug: 29795707
Change-Id: I67209ba2508a93da4fc46ff20986309dbe5a83d5
2016-07-06 13:21:08 -07:00
Doris Ling
0a7300b8d1 Merge "Add help url for gestures settings." into nyc-mr1-dev 2016-06-30 19:59:21 +00:00
Doris Ling
ec208fdb8f Add help url for gestures settings.
Override getHelpResource() in GestureSettings and added corresponding
resource string for the help url.

Bug: 29792538
Change-Id: I2f2d93fc25b63266504bd13b954fefa5692e9ddf
2016-06-30 10:53:07 -07:00
Doris Ling
5d1a512934 Update listener for animation in Gesture Settings.
Use onClick listener instead of onTouch listener for handling playback
for the animation video.

Bug: 29779942
Change-Id: Ia30c0c49635fedd7f5afd4873ed1971529b99dcc
2016-06-28 11:55:20 -07:00
Doris Ling
b4d41d8c71 Update UI for the Gestures settings.
1. Remove list divider
2. Set title background color to white
3. Set color filter on animation preview so that its color matches the
color of the video.

Bug: 28565958
Change-Id: I496915ebdb8e358a0f7682f6075d32a04d8d358a
2016-06-24 13:54:47 -07:00
Andrew Sapperstein
f6e4c5f1ff Flip default value for nav key setting.
It's on by default.

BUG: 28565958
BUG: 29550614
Change-Id: I3bec47f9f495bfec946f09d314407e6b48672b0a
2016-06-22 18:08:37 -07:00
Andrew Sapperstein
9b223788ee Flip default values of two gesture settings.
The settings are enabled by default but the UI wasn't reflecting
that.

Change-Id: Ia321d12bcced4a7e2aa8c4a9fc0a0b7b3f5dad4a
FIXES: 29550614
2016-06-21 17:48:22 -07:00
Doris Ling
f5cecb08fb Add play icon to the gesture settings videos.
1. Add a play button icon to show on top of the gesture videos when the
video is not playing.
2. Dynamically split the gesture video and description text in half
instead of using the hard coded value.
3. Hide the video view if animation is not available.
4. Delay removing the animation preview till the video starts drawing on
the surface texture.

Bug: 28565958
Change-Id: I8b954828d16286014404172d29efa4d2e00432b3
2016-06-17 17:53:35 -07:00
Doris Ling
b1eadb11b4 Add handling for fingerprint swipe in gesture settings.
Hide fingerprint swipe setting if it is not supported, and update the
corresponding config when user enable/disable the fingerprint gesture.

Bug: 28565958
Change-Id: I5a124d3b6933ea6d3aadceaa0eecaa4bee2ccd9d
2016-06-16 12:30:53 -07:00
Doris Ling
d0c8fd724d Update gesture related settings in Display.
1. Remove "Press power button twice for camera. Toggle is now available
in Settings->Gestures.
2. Remove toggle from "Ambient Display" and make it point to
Settings->Gestures->Quick screen check.

Bug: 28565958
Change-Id: I32fd2253a40be76ac9843a627df153eb4f1307d8
2016-06-16 10:23:49 -07:00
Doris Ling
9136523a43 Added new setting for gestures.
Added a new entry to the top level Settings' Device section to
enable/disable gestures.

Bug: 28565958

Change-Id: Icf642b6a3058c692fb2be9914579996598f03b7d
2016-06-13 13:13:21 -07:00