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

Commit 26377086 authored by Chihhang Chuang's avatar Chihhang Chuang Committed by Automerger Merge Worker
Browse files

Merge "[4/4] Move new picker logic to AOSP" into sc-dev am: 1187d676

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/ThemePicker/+/14957117

Change-Id: I692d3d70bd4b6b2f121f0d7a765af6649c7edc8e
parents 1031cf6d 1187d676
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -64,8 +64,6 @@ android_app {
        ":ThemePicker_srcs",
        "src_override/**/*.java",
        "src_override/**/*.kt",
        "src_overridecustom/**/*.java",
        "src_overridecustom/**/*.kt",
    ],

    use_embedded_native_libs: true,
+16 −8
Original line number Diff line number Diff line
@@ -9,6 +9,8 @@
    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
    <uses-permission android:name="android.permission.SET_WALLPAPER_COMPONENT" />

    <uses-permission android:name="android.permission.MODIFY_DAY_NIGHT_MODE" />

    <queries>
        <!-- Specific intents Wallpaper picker query for -->
        <!-- Intent filter with action SET_WALLPAPER -->
@@ -46,17 +48,23 @@
        android:name="com.android.customization.picker.CustomizationPickerApplication"
        android:theme="@style/CustomizationTheme">
        <activity
            android:name="com.android.customization.picker.CustomizationPickerActivity"
            android:name="com.android.wallpaper.picker.CustomizationPickerActivity"
            android:label="@string/app_name"
            android:resizeableActivity="false"
            android:exported="true"
            android:theme="@style/CustomizationTheme.NoActionBar">
            android:theme="@style/CustomizationTheme.NoActionBar"
            android:exported="false"/>

        <activity-alias
            android:name="com.android.customization.picker.CustomizationPickerActivity"
            android:targetActivity="com.android.wallpaper.picker.CustomizationPickerActivity"
            android:label="@string/app_name"
            android:exported="true">
             <intent-filter>
                 <action android:name="android.intent.action.SET_WALLPAPER"/>

                 <category android:name="android.intent.category.DEFAULT"/>
             </intent-filter>
        </activity>
        </activity-alias>

        <activity android:name="com.android.customization.picker.theme.CustomThemeActivity"
                  android:resizeableActivity="false"
                  android:theme="@style/CustomizationTheme.NoActionBar"/>
+0 −41
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2018 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.
-->
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <FrameLayout
        android:id="@+id/fragment_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginBottom="@dimen/bottom_actions_height"/>

    <com.google.android.material.bottomnavigation.BottomNavigationView
        android:id="@+id/main_bottom_nav"
        style="@style/BottomNavStyle"
        android:layout_width="match_parent"
        android:layout_height="@dimen/bottom_actions_height"
        android:layout_gravity="bottom"
        app:labelVisibilityMode="labeled"
        app:menu="@menu/bottom_navigation_menu"/>

    <include layout="@layout/bottom_action_bar" />

</FrameLayout>
+3 −3
Original line number Diff line number Diff line
@@ -15,8 +15,8 @@
 */
package com.android.customization.module;

import static com.android.customization.picker.CustomizationPickerActivity.WALLPAPER_FLAVOR_EXTRA;
import static com.android.customization.picker.CustomizationPickerActivity.WALLPAPER_FOCUS;
import static com.android.wallpaper.picker.CustomizationPickerActivity.WALLPAPER_FLAVOR_EXTRA;
import static com.android.wallpaper.picker.CustomizationPickerActivity.WALLPAPER_FOCUS;

import android.content.Context;
import android.content.Intent;
@@ -28,7 +28,6 @@ import androidx.fragment.app.FragmentActivity;
import com.android.customization.model.theme.OverlayManagerCompat;
import com.android.customization.model.theme.ThemeBundleProvider;
import com.android.customization.model.theme.ThemeManager;
import com.android.customization.picker.CustomizationPickerActivity;
import com.android.wallpaper.model.CategoryProvider;
import com.android.wallpaper.model.WallpaperInfo;
import com.android.wallpaper.module.BaseWallpaperInjector;
@@ -38,6 +37,7 @@ import com.android.wallpaper.module.LoggingOptInStatusProvider;
import com.android.wallpaper.module.WallpaperPreferences;
import com.android.wallpaper.module.WallpaperRotationRefresher;
import com.android.wallpaper.monitor.PerformanceMonitor;
import com.android.wallpaper.picker.CustomizationPickerActivity;
import com.android.wallpaper.picker.PreviewFragment;

public class DefaultCustomizationInjector extends BaseWallpaperInjector
+0 −30
Original line number Diff line number Diff line
/*
 * Copyright (C) 2021 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.
 */
package com.android.customization.picker;

import com.android.customization.model.CustomizationManager;

/**
 * Interface to be implemented by an Activity hosting any Customization Fragment
 */
public interface CustomizationFragmentHost {

    /**
     * Gets the CustomizationManager manager for the given section
     * @return the {@link CustomizationManager}
     */
    CustomizationManager<?> getCustomizationManager(int sectionId);
}
Loading