Commit Graph

20 Commits

Author SHA1 Message Date
Fan Wu
cfb73e2dd3 Re-enable failed tests under settings/widget/
The failing tests should be fixed by the underlying test framework updates

Bug: 315133235

Test: atest
Change-Id: I7f5d8f6af9193409253418b02b674a721489eb28
2024-02-29 02:55:06 +00:00
Yanting Yang
445a8d12db Ignore failing tests of com.android.settings.widget
Bug: 315133235
Test: post-submit
Change-Id: I16c17ff659192c80aa0eb6ee10df82938fa97daf
2023-12-06 15:30:21 +00:00
Eric Rahm
802b922593 Revert "Test Fix SettingRobolectricTest Fail"
This reverts commit 818f77cd1f.

Reason for revert: Underlying issue fixed in ag/23454315.

Bug: b/275023433
Test: atest SettingsGlobalRoboTests

Change-Id: I1af272efd00b3c5bd35310512f5712d5d1c7d834
2023-09-11 13:38:36 +00:00
Vincent Wang
7f21ad81f7 Merge "Test Fix SettingRobolectricTest Fail" into udc-dev am: 5801e98d7f am: 81740a7c0c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23074022

Change-Id: I08589651a8ba8924419b17cba205c0cc3408f6c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 11:14:14 +00:00
Vincent Wang
818f77cd1f Test Fix SettingRobolectricTest Fail
Bug: b/275023433
Test: NA
Change-Id: If2dcb8f6c196327129ccc9375b190e394c994efa
2023-05-09 06:26:39 +00:00
Chun-Ku Lin
b7d513b84d Remove unused MagnificationPreferenceFragment and its related controllers
Bug: 277258376
Bug: 270481978
Test: manually on Pixel & AOSP
Change-Id: I1e0bbecf78290b85e464a4a5de658184eb91ca2c
2023-04-12 00:51:45 +00:00
hughchen
728d63c014 Use values-night to control the dark mode background color
Bug: 149974597
Test: make -j42 RunSettingsRoboTests
Change-Id: Ia10f7bab0ec7781db8b4b4dbdf359bb8a87672cc
2020-03-12 19:47:44 +08:00
hughchen
507218b577 Add setBackgroundColor() in VideoPreference
- Add setBackgroundColor() to allow changed background
  color of VideoPreference.
- Add test case.

Bug: 149974597
Test: make -j42 RunSettingsRoboTests
Change-Id: I14f849d54657dc0ccbd599c393de6f430e9352d4
2020-03-03 18:33:18 +08:00
Raff Tsai
9547fa73cc Fix Settings crashed on tapping on notification animation video
- When preference goes back from pause state, it doesn't call through
onBindViewHolder, caused surface view doesn't attach to Mediaplayer.
Call attachView in initAnimationController and set SurfaceView to
MediaPlayer when onSurfaceTextureUpdated to fix the issue.

Fixes: 143905693
Test: manual, robolectric
Change-Id: I0eceead2e4c90ca176ef0f35937898f9b9be6232
2019-11-05 16:41:35 +08:00
Raff Tsai
68927639ee Remove mVideoPaused from VideoPreference
- We destoryed the MediaPlayer when VideoPreference is onPause().
When VideoPreference is onResumed, MediaPlayer always start from
pause state, we don't need a data save/restore current video state.

Bug: 143270527
Test: robolectric, manual
Change-Id: I544e933e4237f6d92aeff8a7eb04b52e89d74a4a
2019-11-01 10:44:47 +08:00
Raff Tsai
953da2ee40 Add AnimatedVectorDrawable support for VideoPreference
- We are planning to use animation vector drawable to replace mp4
file to reduce apk size
- Add vectorAnimation attr in VideoPreference
- Delegate VideoPreference media control to AnimationController

Bug: 143270527
Test: manual, robolectric
Change-Id: Ia5859f928a9082085cdf715c762f964e1c99e003
2019-10-31 23:42:53 +08:00
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