Loading src/com/android/customization/module/DefaultCustomizationInjector.java +0 −4 Original line number Diff line number Diff line Loading @@ -15,9 +15,6 @@ */ package com.android.customization.module; 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; import android.net.Uri; Loading Loading @@ -107,7 +104,6 @@ public class DefaultCustomizationInjector extends BaseWallpaperInjector Intent intent = new Intent(); intent.setClass(context, CustomizationPickerActivity.class); intent.setData(uri); intent.putExtra(WALLPAPER_FLAVOR_EXTRA, WALLPAPER_FOCUS); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); return intent; } Loading src/com/android/customization/picker/theme/ThemeFragment.java +24 −3 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ import com.android.wallpaper.module.InjectorProvider; import com.android.wallpaper.picker.AppbarFragment; import com.android.wallpaper.widget.BottomActionBar; import com.android.wallpaper.widget.BottomActionBar.AccessibilityCallback; import com.android.wallpaper.widget.BottomActionBar.BottomSheetContent; import java.util.List; Loading Loading @@ -147,9 +148,9 @@ public class ThemeFragment extends AppbarFragment { mBottomActionBar.disableActions(); applyTheme(); }); mThemeInfoView = (ThemeInfoView) LayoutInflater.from(getContext()).inflate( R.layout.theme_info_view, /* root= */ null); mBottomActionBar.attachViewToBottomSheetAndBindAction(mThemeInfoView, INFORMATION); mBottomActionBar.bindBottomSheetContentWithAction( new ThemeInfoContent(getContext()), INFORMATION); mBottomActionBar.setActionClickListener(CUSTOMIZE, this::onCustomizeClicked); // Update target view's accessibility param since it will be blocked by the bottom sheet Loading Loading @@ -378,4 +379,24 @@ public class ThemeFragment extends AppbarFragment { themeToEdit.getSerializedPackages()); startActivityForResult(intent, CustomThemeActivity.REQUEST_CODE_CUSTOM_THEME); } private final class ThemeInfoContent extends BottomSheetContent<ThemeInfoView> { private ThemeInfoContent(Context context) { super(context); } @Override public int getViewId() { return R.layout.theme_info_view; } @Override public void onViewCreated(ThemeInfoView view) { mThemeInfoView = view; if (mSelectedTheme != null) { mThemeInfoView.populateThemeInfo(mSelectedTheme); } } } } src/com/android/customization/picker/theme/ThemeFullPreviewFragment.java +21 −4 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import static com.android.wallpaper.widget.BottomActionBar.BottomAction.APPLY; import static com.android.wallpaper.widget.BottomActionBar.BottomAction.INFORMATION; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.util.Log; Loading @@ -42,6 +43,7 @@ import com.android.wallpaper.model.WallpaperInfo; import com.android.wallpaper.module.InjectorProvider; import com.android.wallpaper.picker.AppbarFragment; import com.android.wallpaper.widget.BottomActionBar; import com.android.wallpaper.widget.BottomActionBar.BottomSheetContent; import com.bumptech.glide.Glide; Loading Loading @@ -131,10 +133,8 @@ public class ThemeFullPreviewFragment extends AppbarFragment { } else { bottomActionBar.showActionsOnly(INFORMATION); } ThemeInfoView themeInfoView = (ThemeInfoView) LayoutInflater.from(getContext()).inflate( R.layout.theme_info_view, /* root= */ null); themeInfoView.populateThemeInfo(mThemeBundle); bottomActionBar.attachViewToBottomSheetAndBindAction(themeInfoView, INFORMATION); bottomActionBar.bindBottomSheetContentWithAction( new ThemeInfoContent(getContext()), INFORMATION); bottomActionBar.show(); } Loading @@ -145,4 +145,21 @@ public class ThemeFullPreviewFragment extends AppbarFragment { activity.setResult(RESULT_OK, intent); activity.finish(); } private final class ThemeInfoContent extends BottomSheetContent<ThemeInfoView> { private ThemeInfoContent(Context context) { super(context); } @Override public int getViewId() { return R.layout.theme_info_view; } @Override public void onViewCreated(ThemeInfoView view) { view.populateThemeInfo(mThemeBundle); } } } Loading
src/com/android/customization/module/DefaultCustomizationInjector.java +0 −4 Original line number Diff line number Diff line Loading @@ -15,9 +15,6 @@ */ package com.android.customization.module; 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; import android.net.Uri; Loading Loading @@ -107,7 +104,6 @@ public class DefaultCustomizationInjector extends BaseWallpaperInjector Intent intent = new Intent(); intent.setClass(context, CustomizationPickerActivity.class); intent.setData(uri); intent.putExtra(WALLPAPER_FLAVOR_EXTRA, WALLPAPER_FOCUS); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); return intent; } Loading
src/com/android/customization/picker/theme/ThemeFragment.java +24 −3 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ import com.android.wallpaper.module.InjectorProvider; import com.android.wallpaper.picker.AppbarFragment; import com.android.wallpaper.widget.BottomActionBar; import com.android.wallpaper.widget.BottomActionBar.AccessibilityCallback; import com.android.wallpaper.widget.BottomActionBar.BottomSheetContent; import java.util.List; Loading Loading @@ -147,9 +148,9 @@ public class ThemeFragment extends AppbarFragment { mBottomActionBar.disableActions(); applyTheme(); }); mThemeInfoView = (ThemeInfoView) LayoutInflater.from(getContext()).inflate( R.layout.theme_info_view, /* root= */ null); mBottomActionBar.attachViewToBottomSheetAndBindAction(mThemeInfoView, INFORMATION); mBottomActionBar.bindBottomSheetContentWithAction( new ThemeInfoContent(getContext()), INFORMATION); mBottomActionBar.setActionClickListener(CUSTOMIZE, this::onCustomizeClicked); // Update target view's accessibility param since it will be blocked by the bottom sheet Loading Loading @@ -378,4 +379,24 @@ public class ThemeFragment extends AppbarFragment { themeToEdit.getSerializedPackages()); startActivityForResult(intent, CustomThemeActivity.REQUEST_CODE_CUSTOM_THEME); } private final class ThemeInfoContent extends BottomSheetContent<ThemeInfoView> { private ThemeInfoContent(Context context) { super(context); } @Override public int getViewId() { return R.layout.theme_info_view; } @Override public void onViewCreated(ThemeInfoView view) { mThemeInfoView = view; if (mSelectedTheme != null) { mThemeInfoView.populateThemeInfo(mSelectedTheme); } } } }
src/com/android/customization/picker/theme/ThemeFullPreviewFragment.java +21 −4 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import static com.android.wallpaper.widget.BottomActionBar.BottomAction.APPLY; import static com.android.wallpaper.widget.BottomActionBar.BottomAction.INFORMATION; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.util.Log; Loading @@ -42,6 +43,7 @@ import com.android.wallpaper.model.WallpaperInfo; import com.android.wallpaper.module.InjectorProvider; import com.android.wallpaper.picker.AppbarFragment; import com.android.wallpaper.widget.BottomActionBar; import com.android.wallpaper.widget.BottomActionBar.BottomSheetContent; import com.bumptech.glide.Glide; Loading Loading @@ -131,10 +133,8 @@ public class ThemeFullPreviewFragment extends AppbarFragment { } else { bottomActionBar.showActionsOnly(INFORMATION); } ThemeInfoView themeInfoView = (ThemeInfoView) LayoutInflater.from(getContext()).inflate( R.layout.theme_info_view, /* root= */ null); themeInfoView.populateThemeInfo(mThemeBundle); bottomActionBar.attachViewToBottomSheetAndBindAction(themeInfoView, INFORMATION); bottomActionBar.bindBottomSheetContentWithAction( new ThemeInfoContent(getContext()), INFORMATION); bottomActionBar.show(); } Loading @@ -145,4 +145,21 @@ public class ThemeFullPreviewFragment extends AppbarFragment { activity.setResult(RESULT_OK, intent); activity.finish(); } private final class ThemeInfoContent extends BottomSheetContent<ThemeInfoView> { private ThemeInfoContent(Context context) { super(context); } @Override public int getViewId() { return R.layout.theme_info_view; } @Override public void onViewCreated(ThemeInfoView view) { view.populateThemeInfo(mThemeBundle); } } }