Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 136ba98d authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11297328 from a75ac07e to 24Q2-release

Change-Id: Iefe1b6f17eef25d29646fb3f52f615f39d5e27d1
parents f3d0696b a75ac07e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -312,6 +312,11 @@ public class FastBitmapDrawable extends Drawable implements Drawable.Callback {
        updateFilter();
    }

    @VisibleForTesting
    public Drawable getBadge() {
        return mBadge;
    }

    /**
     * Updates the paint to reflect the current brightness and saturation.
     */
+6 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.graphics.drawable.Drawable;
import android.graphics.drawable.DrawableWrapper;

import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
import androidx.annotation.Nullable;

/**
@@ -54,9 +55,13 @@ public class UserBadgeDrawable extends DrawableWrapper {
    private final int mBgColor;
    private boolean mShouldDrawBackground = true;

    @VisibleForTesting
    public final boolean mIsThemed;

    public UserBadgeDrawable(Context context, int badgeRes, int colorRes, boolean isThemed) {
        super(context.getDrawable(badgeRes));

        mIsThemed = isThemed;
        if (isThemed) {
            mutate();
            mBaseColor = context.getColor(R.color.themed_badge_icon_color);
@@ -71,6 +76,7 @@ public class UserBadgeDrawable extends DrawableWrapper {
    private UserBadgeDrawable(Drawable base, int bgColor, int baseColor,
            boolean shouldDrawBackground) {
        super(base);
        mIsThemed = false;
        mBgColor = bgColor;
        mBaseColor = baseColor;
        mShouldDrawBackground = shouldDrawBackground;
+32 −32
Original line number Diff line number Diff line
@@ -16,47 +16,26 @@ package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

// The weather effects library only contains rendering logic.
android_library {
    name: "WeatherEffectsLib",
    manifest: "AndroidManifest.xml",
    name: "WeatherEffectsGraphicsLib",
    sdk_version: "system_current",
    // min_sdk version must be specified to not compile against platform apis.
    // Using HardwareBufferRenderer requires minimum of 34.
    min_sdk_version: "34",
    static_libs: [
        "androidx.slice_slice-core",
        "androidx.slice_slice-builders",
        "dagger2",
        "jsr330", // Dagger inject annotations.
        "kotlinx_coroutines_android",
        "kotlinx_coroutines",
        "androidx.core_core-ktx",
        // Do not add Torus dependency here, since this package is only for rendering. The host app
        // will include Torus or Livewallpaper frameworks.
        "androidx.appcompat_appcompat",
        "androidx-constraintlayout_constraintlayout",
        "toruslib",
    ],
    srcs: [
        "src/**/*.java",
        "src/**/*.kt",
        // TODO(b/300991599): Split out debug source.
        "debug/src/**/*.java",
        "debug/src/**/*.kt"
    ],
    resource_dirs: [
        "res",
        // TODO(b/300991599): Split out debug resources.
        "debug/res"
    ],
    // TODO(b/300991599): Split out debug resources.
    asset_dirs: [
        "debug/assets"
        "graphics/src/**/*.java",
        "graphics/src/**/*.kt",
    ],
    javacflags: ["-Adagger.fastInit=enabled"],
    kotlincflags: ["-Xjvm-default=all"],
    plugins: ["dagger2-compiler"],
    dxflags: ["--multi-dex"],
    // This library is meant to access only public APIs, do not flip this flag to true.
    platform_apis: false
}

// Debug app.
@@ -64,11 +43,33 @@ android_app {
    name: "WeatherEffectsDebug",
    manifest: "debug/AndroidManifest.xml",
    owner: "google",
    privileged: false,
    sdk_version: "system_current",
    min_sdk_version: "34",
    srcs: [
        "src/**/*.java",
        "src/**/*.kt",
        "debug/src/**/*.java",
        "debug/src/**/*.kt",
    ],
    resource_dirs: [
        "res",
        "debug/res",
    ],
    asset_dirs: [
        "debug/assets",
    ],
    static_libs: [
        "WeatherEffectsLib"
        "androidx.slice_slice-core",
        "androidx.slice_slice-builders",
        "dagger2",
        "jsr330", // Dagger inject annotations.
        "kotlinx_coroutines_android",
        "kotlinx_coroutines",
        "androidx.core_core-ktx",
        "androidx.appcompat_appcompat",
        "androidx-constraintlayout_constraintlayout",
        "toruslib",
        "WeatherEffectsGraphicsLib",
    ],
    use_embedded_native_libs: true,
    plugins: ["dagger2-compiler"],
@@ -90,13 +91,12 @@ android_test {
        "tests/src/**/*.kt",
    ],
    static_libs: [
        "WeatherEffectsLib",
        "WeatherEffectsGraphicsLib",
        "androidx.test.rules",
        "androidx.test.ext.junit",
        "androidx.test.core",
        "androidx.test.runner",
        "kotlinx_coroutines_test",
        "truth"
        "truth",
    ],
}
+0 −34
Original line number Diff line number Diff line
@@ -16,38 +16,4 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.google.android.wallpaper.weathereffects">

    <!--TODO: Add privileged permission-->

    <uses-feature
        android:name="android.software.live_wallpaper"
        android:required="true" />

    <queries>
        <package android:name="com.google.android.apps.wallpaper" />
        <package android:name="com.android.wallpaper" />
    </queries>

    <application
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name">
        <provider
            android:name="com.google.android.wallpaper.weathereffects.provider.WeatherEffectsContentProvider"
            android:authorities="${applicationId}.effectprovider"
            android:exported="true" />
        <service android:name="com.google.android.wallpaper.weathereffects.WeatherWallpaperService"
            android:directBootAware="true"
            android:exported="true"
            android:label="@string/app_name"
            android:permission="android.permission.BIND_WALLPAPER">
            <intent-filter>
                <action android:name="android.service.wallpaper.WallpaperService" />
            </intent-filter>

            <meta-data
                android:name="android.service.wallpaper"
                android:resource="@xml/weather_wallpaper" />
        </service>

    </application>
</manifest>
+1 −0
Original line number Diff line number Diff line
@@ -128,6 +128,7 @@ android {

dependencies {
    implementation project(':toruslib')
    implementation project(':graphics')

    implementation "androidx.slice:slice-builders:$versions.androidXLib"
    implementation "androidx.slice:slice-core:$versions.androidXLib"
Loading