diff options
author | Chihhang Chuang <chihhangchuang@google.com> | 2021-06-15 05:01:59 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-06-15 05:01:59 +0000 |
commit | 1187d676d02d03bfa47ce6cd4cee4cb91f443bb1 (patch) | |
tree | cb39aa526a3b4cff258e6686f597484b9a87d0e6 /src/com/android | |
parent | 82c09c5e89e982df3d6935f1187028c7814209b4 (diff) | |
parent | eecf85e1eba012f6224ad7d47be3880f14d5204a (diff) | |
download | ThemePicker-1187d676d02d03bfa47ce6cd4cee4cb91f443bb1.tar.gz |
Merge "[4/4] Move new picker logic to AOSP" into sc-dev
Diffstat (limited to 'src/com/android')
4 files changed, 4 insertions, 65 deletions
diff --git a/src/com/android/customization/module/DefaultCustomizationInjector.java b/src/com/android/customization/module/DefaultCustomizationInjector.java index 969f22fb..5b5c11ef 100644 --- a/src/com/android/customization/module/DefaultCustomizationInjector.java +++ b/src/com/android/customization/module/DefaultCustomizationInjector.java @@ -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 diff --git a/src/com/android/customization/picker/CustomizationFragmentHost.java b/src/com/android/customization/picker/CustomizationFragmentHost.java deleted file mode 100644 index d700ec60..00000000 --- a/src/com/android/customization/picker/CustomizationFragmentHost.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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); -} diff --git a/src/com/android/customization/picker/grid/GridFragment.java b/src/com/android/customization/picker/grid/GridFragment.java index 0a7a2606..18fb5a75 100644 --- a/src/com/android/customization/picker/grid/GridFragment.java +++ b/src/com/android/customization/picker/grid/GridFragment.java @@ -44,7 +44,6 @@ import com.android.customization.model.grid.GridOptionsManager; import com.android.customization.module.ThemesUserEventLogger; import com.android.customization.picker.ViewOnlyFullPreviewActivity; import com.android.customization.picker.WallpaperPreviewer; -import com.android.customization.util.LaunchUtils; import com.android.customization.widget.OptionSelectorController; import com.android.customization.widget.OptionSelectorController.CheckmarkStyle; import com.android.wallpaper.R; @@ -52,6 +51,7 @@ import com.android.wallpaper.model.WallpaperInfo; import com.android.wallpaper.module.CurrentWallpaperInfoFactory; import com.android.wallpaper.module.InjectorProvider; import com.android.wallpaper.picker.AppbarFragment; +import com.android.wallpaper.util.LaunchUtils; import com.android.wallpaper.widget.BottomActionBar; import com.bumptech.glide.Glide; diff --git a/src/com/android/customization/util/LaunchUtils.java b/src/com/android/customization/util/LaunchUtils.java deleted file mode 100644 index 57791687..00000000 --- a/src/com/android/customization/util/LaunchUtils.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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.util; - -import android.content.Context; -import android.content.Intent; - -/** Util class for launching activity. */ -public class LaunchUtils { - - /** Goes to Launcher's Home. */ - public static void launchHome(Context context) { - Intent launcherIntent = new Intent(Intent.ACTION_MAIN); - launcherIntent.addCategory(Intent.CATEGORY_HOME); - launcherIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); - context.startActivity(launcherIntent); - } -} |