27 Commits

Author SHA1 Message Date
Lucas Dupin
5febf7eb6b Fix flaky test
Test was registering a listener, and events could come from wallpaper
manager making it unstable.

Fixes: 134485306
Test: atest SysuiColorExtractorTests
Change-Id: Ie838cbee0887f3503ce328d5c5b5603c413d5458
2019-06-04 20:47:29 -07:00
Robert Snoeberger
a6684f6713 Pick the primary color as the best color to use.
Previously, the best color was picked by checking the colors
against the blacklist. The logic was for picking the best color
was broken When the blacklist was removed for
b/124180048.

Fixes: b129762944
Test: New test points added to TonalTest.java
Change-Id: Ie51806735910bb40e5e66d7baf545ea213e4a01e
2019-04-02 15:15:38 -04:00
Sasha Smundak
89414e1ed5 Convert tests/**/Android.mk files to Android.bp, part II
See build/soong/README.md for more information.

Bug: 122332340
Test: treehugger
Change-Id: I886b6536a0ef1c8d21f15ec7ff9fdb9784d5b865
2019-03-12 09:37:32 -07:00
Robert Snoeberger
4603244f68 Delete the color extraction blacklist
Bug: 124180048
Test: TonalTest passes
Change-Id: Ia3c00d88e2b224a5ea2f81e3734f2b3eff8a712a
2019-03-08 15:58:38 -05:00
Brett Chabot
502ec7ae4b Migrate remainder of frameworks/base to androidx.test
See go/jetpack-test-android-migration

Exempt-From-Owner-Approval: automated package name refactoring

Test: m  m -j BroadcastRadioTests KeystoreTests mediaframeworktest ActivityManagerPerfTests AppLaunch AppLaunchWear BackgroundDexOptServiceIntegrationTests AppCompatibilityTest DynamicCodeLoggerIntegrationTests FlickerLibTest InternalTests PackageWatchdogTest RcsTests RollbackTestAppAv1 RollbackTestAppAv2 RollbackTestAppACrashingV2 RollbackTestAppBv1 RollbackTestAppBv2 RollbackTestAppASplitV1 RollbackTestAppASplitV2 RollbackTest ServiceCrashTest UsageStatsPerfTests UsbTests WindowAnimationJank
Change-Id: I32fe3297656eec6060da6c7e24582bcd5315fb16
2019-03-02 00:35:17 +00:00
wilsonshih
0e490d9e77 Improve the performance when loading image wallpaper colors
When SystemUI start up, ColorExtractor will get wallpaper colors so
status bar can use it to update theme, however, this will also block
SystemUI start up process if the wallpaper is image wallpaper.
In order to break the latency, we can extract getWallpaperColors
method from ColorExtractor's contructor, and do it at another thread,
so it won't block SystemUI start up.

Bug: 124279857
Test: atest ColorExtractorTest
Test: Manual test change theme feature can work normally.

Change-Id: I8589b28a17b0a2b33b4bbbda2265080af983f26a
2019-02-19 10:06:22 +08:00
Lucas Dupin
4c8c3274da Ambient wallpaper API feedback
Making this api a @SystemApi, protecting it with a permission and
changing boolean animation parameter to a long.

Change-Id: Ife6aac2806a5590288a801751f22d85c3cfd4622
Fixes: 116117810
Test: atest DozeWallpaperStateTest
Test: atest WallpaperServiceTest
Test: set image wallpaper
Test: set AOD wallpaper that holds permission
Test: set AOD wallpaper that doesn't hold permission
2018-11-29 17:38:11 +01:00
Weien Wang
4710c04e1f Add new WallpaperInfo attr settingsSliceUri.
Add settingsSliceUri attribute for supporting live wallpaper inline-
control, public for AOSP live wallpaper to use.

Bug: 117200693
Test: atest tests/Internal/src/android/app/WallpaperInfoTest.java

Change-Id: Iffe9fbd9f49daf8a63d5745f91532de13b7288e3
2018-10-22 14:16:55 +08:00
Lucas Dupin
8f09a5057e Expose Ambient Wallpaper API
In P we introduced a private concept of AOD wallpapers, in Q
we're making it a public surface.

Bug: 111395593
Test: make
Change-Id: I4c406386f0ee15dc8734a24b040482b6cb807126
2018-07-30 10:42:06 +08:00
Anton Hansson
ab6ec61251 frameworks/base: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Change-Id: I4233b9091d9066c4fa69f3d24aaf367ea500f760
2018-02-28 15:13:23 +00:00
Lucas Dupin
47e7cfd8b5 Ignore more yellows and greens
Updated palettes to ignore a broader range or yellows, greens
and adjacent colors.

Change-Id: Ied6c3ea0cb917a19548483a42d66f1f4b4fee4f7
Fixes: 68683213
Test: atest tests/Internal/src/com/android/internal/colorextraction/types/TonalTest.java
2018-02-05 17:23:42 -08:00
Lucas Dupin
660d573e43 Let wallpaper know when to animate AoD transition
Sometimes the screen will blank, and sometime the
wallpaper has the opportunity to animate the
transition.

Bug: 64155983
Test: atest tests/Internal/src/android/service/wallpaper/WallpaperServiceTest.java
Test: atest packages/SystemUI/tests/src/com/android/systemui/doze/DozeWallpaperStateTest.java
Change-Id: Ia92c00edb98eeeba42da33bdc7bec3feb961a658
2017-12-20 13:15:44 -08:00
Lucas Dupin
7517b5dcce Support wallpapers in AoD
Such wallpaper has to define supportsAmbientMode,
and set it to true on its android.service.wallpaper
meta data.

Also introduces WallpaperService.Engine#onAmbientModeChanged
to notify a live wallpaper that the display state has changed.

Change-Id: I49e846069a698b3cc3bb6e7cda98172920eaae4c
Bug: 64155983
Test: runtest -x frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/DozeWallpaperStateTest.java
Test: runtest -x frameworks/base/tests/Internal/src/android/app/WallpaperInfoTest.java
Test: runtest -x frameworks/base/tests/Internal/src/android/service/wallpaper/WallpaperServiceTest.java
Test: set AoD wallpaper, go to aod, lock screen, launcher
Test: set regular wallpaper, go to aod, lock screen, launcher
2017-12-18 11:28:16 -08:00
Paul Duffin
b866307f99 Stop statically including legacy-android-test
Statically including legacy-android-test leads to duplicate classes
which causes build time problems (with Proguard) and runtime problems on
older SDK versions. This change:
* Stops statically including legacy-android-test.
* Adds compile time dependencies on andoid.test.base, android.test.mock
  and android.test.runner where necessary.
* Adds <uses-library android:name="android.test.runner"/> to any
  affected package to ensure that the classes that were included by
  legacy-android-test are still available at runtime. That also adds a
  dependency on android.test.base and android.test.mock.

The following change descriptions were generated automatically and so
may be a little repetitive. They are provided to give the reviewer
enough information to check the comments match what has actually been
changed and check the reasoning behind the changes.

* apct-tests/perftests/core/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in CorePerfTests results
    in duplicate classes which leads to build time and compile time
    issues.

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    CorePerfTests's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

* core/tests/ConnectivityManagerTest/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    ConnectivityManagerTest's source depends on its classes and because
    of these changes they are no longer present on the compilation
    path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in ConnectivityManagerTest
    results in duplicate classes which leads to build time and compile
    time issues.

* core/tests/bandwidthtests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    BandwidthTests's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in BandwidthTests results
    in duplicate classes which leads to build time and compile time
    issues.

* core/tests/bluetoothtests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    BluetoothTests's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in BluetoothTests results
    in duplicate classes which leads to build time and compile time
    issues.

* core/tests/hosttests/test-apps/DownloadManagerTestApp/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in DownloadManagerTestApp
    results in duplicate classes which leads to build time and compile
    time issues.

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    DownloadManagerTestApp's source depends on its classes and because
    of these changes they are no longer present on the compilation
    path.

* core/tests/hosttests/test-apps/ExternalSharedPerms/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in
    ExternalSharedPermsTestApp results in duplicate classes which leads
    to build time and compile time issues.

* core/tests/hosttests/test-apps/ExternalSharedPermsBT/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in
    ExternalSharedPermsBTTestApp results in duplicate classes which
    leads to build time and compile time issues.

* core/tests/hosttests/test-apps/ExternalSharedPermsDiffKey/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in
    ExternalSharedPermsDiffKeyTestApp results in duplicate classes
    which leads to build time and compile time issues.

* core/tests/hosttests/test-apps/ExternalSharedPermsFL/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in
    ExternalSharedPermsFLTestApp results in duplicate classes which
    leads to build time and compile time issues.

* core/tests/notificationtests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    NotificationStressTests's source depends on its classes and because
    of these changes they are no longer present on the compilation
    path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in NotificationStressTests
    results in duplicate classes which leads to build time and compile
    time issues.

* keystore/tests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in KeystoreTests results
    in duplicate classes which leads to build time and compile time
    issues.

* media/mca/tests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    CameraEffectsTests's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in CameraEffectsTests
    results in duplicate classes which leads to build time and compile
    time issues.

* media/tests/MediaFrameworkTest/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    mediaframeworktest's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in mediaframeworktest
    results in duplicate classes which leads to build time and compile
    time issues.

* nfc-extras/tests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in NfcExtrasTests results
    in duplicate classes which leads to build time and compile time
    issues.

* packages/CarrierDefaultApp/tests/unit/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    CarrierDefaultAppUnitTests's source depends on its classes and
    because of these changes they are no longer present on the
    compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in
    CarrierDefaultAppUnitTests results in duplicate classes which leads
    to build time and compile time issues.

* packages/ExtServices/tests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    ExtServicesUnitTests's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in ExtServicesUnitTests
    results in duplicate classes which leads to build time and compile
    time issues.

* packages/MtpDocumentsProvider/tests/Android.mk
    Added 'android.test.base' and 'android.test.mock' to
    LOCAL_JAVA_LIBRARIES because MtpDocumentsProviderTests's source
    depends on their classes and because of these changes they are no
    longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in
    MtpDocumentsProviderTests results in duplicate classes which leads
    to build time and compile time issues.

* packages/SettingsLib/tests/integ/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    SettingsLibTests's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in SettingsLibTests
    results in duplicate classes which leads to build time and compile
    time issues.

* packages/SettingsProvider/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in SettingsProvider
    results in duplicate classes which leads to build time and compile
    time issues.

* packages/SettingsProvider/AndroidManifest.xml
    Add uses-library for android.test.runner because otherwise this
    change would change the set of files available to SettingsProvider
    at runtime.

* packages/Shell/tests/Android.mk
    Added 'android.test.base' and 'android.test.mock' to
    LOCAL_JAVA_LIBRARIES because ShellTests's source depends on their
    classes and because of these changes they are no longer present on
    the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in ShellTests results in
    duplicate classes which leads to build time and compile time
    issues.

* packages/SystemUI/shared/tests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in SystemUISharedLibTests
    results in duplicate classes which leads to build time and compile
    time issues.

* packages/SystemUI/tests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in SystemUITests results
    in duplicate classes which leads to build time and compile time
    issues.

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    SystemUITests's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

* packages/WAPPushManager/tests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    WAPPushManagerTests's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in WAPPushManagerTests
    results in duplicate classes which leads to build time and compile
    time issues.

* sax/tests/saxtests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    FrameworksSaxTests's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in FrameworksSaxTests
    results in duplicate classes which leads to build time and compile
    time issues.

* tests/BrowserPowerTest/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    BrowserPowerTests's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in BrowserPowerTests
    results in duplicate classes which leads to build time and compile
    time issues.

* tests/CanvasCompare/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    CanvasCompare's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in CanvasCompare results
    in duplicate classes which leads to build time and compile time
    issues.

* tests/CoreTests/android/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    CoreTests's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in CoreTests results in
    duplicate classes which leads to build time and compile time
    issues.

* tests/DataIdleTest/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    DataIdleTest's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in DataIdleTest results in
    duplicate classes which leads to build time and compile time
    issues.

* tests/FrameworkPerf/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    FrameworkPerf's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in FrameworkPerf results
    in duplicate classes which leads to build time and compile time
    issues.

* tests/HierarchyViewerTest/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    HierarchyViewerTest's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in HierarchyViewerTest
    results in duplicate classes which leads to build time and compile
    time issues.

* tests/ImfTest/tests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    ImfTestTests's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in ImfTestTests results in
    duplicate classes which leads to build time and compile time
    issues.

* tests/Internal/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in InternalTests results
    in duplicate classes which leads to build time and compile time
    issues.

* tests/MemoryUsage/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    MemoryUsage's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in MemoryUsage results in
    duplicate classes which leads to build time and compile time
    issues.

* tests/NetworkSecurityConfigTest/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    NetworkSecurityConfigTests's source depends on its classes and
    because of these changes they are no longer present on the
    compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in
    NetworkSecurityConfigTests results in duplicate classes which leads
    to build time and compile time issues.

* tests/SoundTriggerTests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in SoundTriggerTests
    results in duplicate classes which leads to build time and compile
    time issues.

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    SoundTriggerTests's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

* tests/SurfaceComposition/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in SurfaceComposition
    results in duplicate classes which leads to build time and compile
    time issues.

    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    SurfaceComposition's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

* tests/TtsTests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in TtsTests results in
    duplicate classes which leads to build time and compile time
    issues.

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    TtsTests's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

* tests/WindowAnimationJank/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in WindowAnimationJank
    results in duplicate classes which leads to build time and compile
    time issues.

* tests/permission/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    FrameworkPermissionTests's source depends on its classes and
    because of these changes they are no longer present on the
    compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in
    FrameworkPermissionTests results in duplicate classes which leads
    to build time and compile time issues.

* tests/testables/tests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in TestablesTests results
    in duplicate classes which leads to build time and compile time
    issues.

    Added 'android.test.base' and 'android.test.mock' to
    LOCAL_JAVA_LIBRARIES because TestablesTests's source depends on
    their classes and because of these changes they are no longer
    present on the compilation path.

Bug: 30188076
Test: make checkbuild
Change-Id: Iacfc939c97415314366ed61c5f3b7aa1a40f0ec9
2017-12-08 00:07:17 +00:00
Lucas Dupin
e2efebc8a2 Do not filter out some colors
Colors specified manually using the public WallpaperColors
constructor should not be blacklisted.

Test: runtest -x tests/Internal/src/android/app/WallpaperColorsTest.java
Test: runtest -x tests/Internal/src/com/android/internal/colorextraction/types/TonalTest.java
Change-Id: I96faf413e3629c247220d825bb7c3480ed2f1003
Fixes: 64361146
2017-08-15 11:30:19 -07:00
Lucas Dupin
9324aa926a Scrim opacity must satisfy GAR
Change-Id: Ic0a2423d73f0a3439a0dc4de8eb6e4719dbf36e1
Fixes: 63365056
Test: runtest -x tests/Internal/src/com/android/internal/graphics/ColorUtilsTest.java
2017-07-28 10:07:04 -07:00
Lucas Dupin
e17ce5286f Fix jank when switching themes
Turning overlays on and off takes time,
it also doesn't allow us to have fine control
over which view is using which theme.
Lock screen colors are now driven by themes.

Change-Id: Ie8860d00dbb0705ed76edf60a9d3030618dd21ca
Fixes: 63751714
Test: Visual. Set wallpapers, unlock.
Test: runtest -x packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerTest.java
Test: runtest -x tests/Internal/src/com/android/internal/colorextraction/ColorExtractorTest.java
Test: systrace
2017-07-24 13:26:22 -07:00
Jorim Jaggi
6498f96283 Revert "Fix jank when switching themes"
This reverts commit e5d0b9dddbcd8e6be7725a89b82fb990db2dade7.

Fixes crashloop with lock pattern

Change-Id: I3721444c91e2be625c59ec3e6ba14f1080badc07
Fixes: 63980375
2017-07-24 15:53:42 +02:00
Lucas Dupin
e5d0b9dddb Fix jank when switching themes
Turning overlays on and off takes time,
it also doesn't allow us to have fine control
over which view is using which theme.
Lock screen colors are now driven by themes.

Change-Id: I4b5db6234cafebbe8eaa952781c038370a11488b
Fixes: 63751714
Test: Visual. Set wallpapers, unlock.
Test: runtest -x tests/Internal/src/com/android/internal/colorextraction/ColorExtractorTest.java
Test: systrace
2017-07-20 22:44:36 -07:00
TreeHugger Robot
bc907cf9a8 Merge "Don't recycle bitmaps we don't own" into oc-dr1-dev 2017-07-18 20:08:58 +00:00
Lucas Dupin
42acf6009a Don't recycle bitmaps we don't own
WallpaperColors#fromBitmap should only recycle the bitmaps
created by itself.

Test: runtest -x tests/Internal/src/android/app/WallpaperColorsTest.java
Fixes: 63758291
Change-Id: I1710bf7118b6ae871442f9606f95ac9c9dbb7d24
2017-07-17 16:35:29 +00:00
Lucas Dupin
6e69c85ddc Move palette constants to XML
Test: runtest -x tests/Internal/src/com/android/internal/colorextraction/types/TonalTest.java
Change-Id: I22a5ef9b89c113f75261e8884fa1affb07b2265f
Fixes: 62373429
2017-07-14 09:35:05 -07:00
Lucas Dupin
c77b71d7f0 In-app gradient color based on systemui theme.
When viewing your scrim on top of an app (wallpaper not visible),
the gradient color should be dark if your wallpaper is dark and
light if your wallpaper is light.

Change-Id: I5f3aea5bf9ec066b7caecd7cadfd2814e3758bd1
Fixes: 63121129
Bug: 63365056
Test: runtest -x tests/Internal/src/com/android/internal/colorextraction/types/TonalTest.java
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/colorextraction/SysuiColorExtractorTests.java
2017-07-12 10:40:23 -07:00
Lucas Dupin
8b94ef697e Merge "Add theme style flag to WallpaperColors" into oc-dr1-dev 2017-07-10 16:49:33 +00:00
Lucas Dupin
4bd24f36c5 Add theme style flag to WallpaperColors
Theme colors should always be the same in sysui and launcher.
We're now sharing a hint HINT_SUPPORTS_DARK_THEME, to make sure
we're never out of sync.

Test: runtest -x tests/Internal/src/android/app/WallpaperColorsTest.java
Fixes: 63140091
Change-Id: Ibd196f540d77269df377804b0f4d4d0d20820067
2017-07-07 14:36:45 -07:00
Lucas Dupin
e2292a94bb Moving color extraction classes
Fixes: 62220212
Test: make
Test: runtest -x tests/Internal/src/com/android/internal/colorextraction/ColorExtractorTest.java
Test: runtest -x tests/Internal/src/com/android/internal/colorextraction/types/TonalTest.java
Test: runtest systemui
Change-Id: I7c4cf5c40a88555e81fbad9bec2b32c55c927468
Merged-In: I7c4cf5c40a88555e81fbad9bec2b32c55c927468
2017-07-07 10:48:43 -07:00
Lucas Dupin
1d3c00d5c7 K-Means color clustering
Test: runtest -x tests/Internal/src/com/android/internal/ml/clustering/KMeansTest.java
Bug: 37014702
Change-Id: Idabc163df5ded362acbe462ae6b351394a36db10
2017-06-16 18:04:42 -07:00