Commit Graph

9 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
James Lemieux
f1dade40d2 Use binary resource support in robolectric
The resources available to tests are now exactly the merged resources
located in the APK under test.

Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
2018-12-12 19:53:49 -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
tmfang
99cc23d0da Settings Fragment Migration (Change imports)
This commit *only* changes imports and optimize imports.
We don't do anything else.

This patch can't compile pass and run test case.
We will update other patches to fix these problem.

Change list.

1. import android.app.Fragment; ->
   import androidx.fragment.app.Fragment;
2. import android.app.DialogFragment; ->
   import androidx.fragment.app.DialogFragment;
3. import android.app.ListFragment; ->
   import androidx.fragment.app.ListFragment;
4. import android.app.LoaderManager; ->
   import androidx.loader.app.LoaderManager;
5. import android.content.AsyncTaskLoader; ->
   import androidx.loader.content.AsyncTaskLoader;
6. import android.content.Loader; ->
   import androidx.loader.content.Loader;
7. import android.app.FragmentTransaction; ->
   import androidx.fragment.app.FragmentTransaction;
8. import android.app.FragmentManager; ->
   import androidx.fragment.app.FragmentManager;
9. import android.app.LoaderManager.LoaderCallbacks; ->
    import androidx.loader.app.LoaderManager.LoaderCallbacks;

Bug: 110259478
Test: Can't test it.
Change-Id: I0a3f98fff34a3494a839c3c42aeabcec3df2c8b3
2018-07-11 18:23:51 -07: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