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

Commit d4d9e6af authored by Yein Jo's avatar Yein Jo
Browse files

Copy over WeatherEffects.

- Need to separate prod and debug builds.
- ViewBinding is removed as it's not supported by Soong build.
- Interactor was moved to the correct pacakge location.
- Added some more comments & javadocs.
- Removed debug assets due to copyright.

Bug: 290939683
Bug: 300991599
Test: mmm weathereffects, gradle build
Change-Id: Ibcbbbe1f8a8ae42c310f04bb4b3e67b8409da069
parent 54d3d486
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ android_library {
    optimize: {
        enabled: true,
    },
    min_sdk_version: "31",
    sdk_version: "system_current",
}
+2 −0
Original line number Diff line number Diff line
@@ -53,6 +53,8 @@ subprojects {
        apply plugin: 'kotlin-android'

        android {
            namespace "com.google.android.torus"

            compileSdkVersion versions.compileSdk
            buildToolsVersion versions.buildTools

+3 −3
Original line number Diff line number Diff line
@@ -31,12 +31,12 @@ android {
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }

    kotlinOptions {
        jvmTarget = '1.8'
        jvmTarget = '17'
    }

    sourceSets {
+14 −0
Original line number Diff line number Diff line
# Copyright (C) 2023 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
+4 −4
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import android.content.IntentFilter
import android.content.res.Configuration
import android.graphics.PixelFormat
import android.os.Build
import android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE
import android.os.Bundle
import android.service.wallpaper.WallpaperService
import android.view.MotionEvent
@@ -209,11 +208,12 @@ abstract class LiveWallpaper : WallpaperService() {
        fun getEngineSurfaceHolder(): SurfaceHolder? = this.wallpaperServiceEngine?.surfaceHolder

        /** Returns the wallpaper flags indicating which screen this Engine is rendering to. */
        @RequiresApi(UPSIDE_DOWN_CAKE)
        fun getWallpaperFlags(): Int {
            if (Build.VERSION.SDK_INT >= 34) {
                this.wallpaperServiceEngine?.let {
                    return it.wallpaperFlags
                }
            }
            return WALLPAPER_FLAG_NOT_FOUND
        }

Loading