Commit Graph

11 Commits

Author SHA1 Message Date
Salvador Martinez
1053ec04b4 Update dark theme to have new screen
The dark theme preference should have it's own screen rather than
being a dialog. This adds some boilerplate code that will be
needed for the illustration as well as converting the current
list preference to open a new screen.

Test: robotests
Bug: 128686189
Change-Id: I5b62276353c0d39ad2ad00d21d2280e76cceb09b
2019-03-26 13:17:11 -07:00
Raff Tsai
2831b14048 Release the media player when the video preference is not visible.
Mediaplayer is not released when the device is paused, and hence it
keep consuming battery.

Fixes: 120945749
Test: adb root && watch -n 0.5 -d "adb shell cat /sys/kernel/debug/msm_vidc/core0/inst*/info\|egrep -i \"height\|width\|instance\|fps\|name\""
      Use above command to check if any decoder instance exists.

Change-Id: Ia0edbba0c2fd3c70753bc36d23d82c0770f95672
2019-01-03 12:12:51 +08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Doris Ling
8700777839 Fix continous playing of gesture animation video.
In the gesture settings, we listen to surface texture updates to
determine when both the view and video is ready, and we auto play the
animation video. However, sometimes, the video listener will receive
the surface texture updates after the settings activity is being paused,
in which case, the video will continue to play until the user navigate
back to that gesture settings page.

In onSurfaceTextureUpdated(), check for view visibility before we try to
update anything to avoid unnecessary operation.

Change-Id: I46474c9f461d5705f599deb8b2535d8505f2fe75
Bug: 110923173
Test: make RunSettingsRoboTests
2018-06-29 14:22:36 -07:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Lei Yu
0a358ba47c Add battery illustration
Also update the VideoPreference to handle the full screen
illustration by adding attr isFullWidth and aspectRadio.

Change-Id: If2ccba4ce792801c6fd79b7c60af4e3826c091cc
Fixes: 74409022
Test: Screenshot | RunSettingsRoboTests
2018-04-05 10:26:41 -07:00
Doris Ling
c84001528c Fix gesture preview image visibility not set correctly.
- update for the preview image is done only in onStart()/Stop().
Move the handling to onPause()/onResume() instead so that visibility
updates will also be done when switching between pages.
- remove the obsolete GesturePreference class.

Change-Id: I743a9d41f17aab3303201e11e5bba708ca5810ae
Fix: 63783217
Test: make RunSettingsRoboTests
2017-07-20 20:41:43 +00:00
Doris Ling
a689787b71 Automatically play the gesture video when the setting is launched.
- and save the video pause state on config change so that the paused
video will not auto start again on screen rotation.

Change-Id: I3f41849ee3063942fb4141e4556e494bc8439226
Fix: 63145847
Test: make RunSettingsRoboTests
2017-07-11 10:38:24 -07:00
Fan Zhang
26ce68c0ea Hide video preference when video is not avaiable.
Change-Id: Ic4efc21d41b328591f2146534b7edecd86cb83ac
Fix: 35855399
Test: manual
2017-03-07 15:59:39 -08:00
Fan Zhang
33b0d91d74 Add video to each gesture preference screen.
- Refactor GesturePreference to a generic VideoPreference.
- The old video_preference.xml is only for magnification video, so
  renamed.
- And use VideoPreference in gesture setting pages.
- Refactor common logic into GesturePreferenceController.

Bug: 32637613
Test: RunSettingsRoboTests

Change-Id: I58580b01a32873cb32c5dc5bf2ec021d5b1400cc
2016-11-10 15:24:45 -08:00