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

Commit f831340c authored by Santiago Etchebehere's avatar Santiago Etchebehere Committed by Automerger Merge Worker
Browse files

Merging from ub-launcher3-rvc-qpr-dev @ build 6827161 am: a30f0366

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

Change-Id: Icd6d2955017e795346ae073f69b073f4dadfc192
parents 1dc52218 a30f0366
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ import com.android.wallpaper.module.WallpaperPreferences;
import com.android.wallpaper.picker.BottomActionBarFragment;
import com.android.wallpaper.picker.CategoryFragment;
import com.android.wallpaper.picker.CategoryFragment.CategoryFragmentHost;
import com.android.wallpaper.picker.FragmentTransactionChecker;
import com.android.wallpaper.picker.MyPhotosStarter;
import com.android.wallpaper.picker.MyPhotosStarter.PermissionChangedListener;
import com.android.wallpaper.picker.TopLevelPickerActivity;
@@ -90,7 +91,7 @@ import java.util.Map;
 */
public class CustomizationPickerActivity extends FragmentActivity implements WallpapersUiContainer,
        CategoryFragmentHost, ThemeFragmentHost, GridFragmentHost, ClockFragmentHost,
        BottomActionBarHost {
        BottomActionBarHost, FragmentTransactionChecker {

    public static final String WALLPAPER_FLAVOR_EXTRA =
            "com.android.launcher3.WALLPAPER_FLAVOR";
@@ -105,6 +106,7 @@ public class CustomizationPickerActivity extends FragmentActivity implements Wal
    private static final Map<Integer, CustomizationSection> mSections = new HashMap<>();
    private CategoryFragment mWallpaperCategoryFragment;
    private BottomActionBar mBottomActionBar;
    private boolean mIsSafeToCommitFragmentTransaction;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
@@ -155,6 +157,7 @@ public class CustomizationPickerActivity extends FragmentActivity implements Wal
    @Override
    protected void onResume() {
        super.onResume();
        mIsSafeToCommitFragmentTransaction = true;
        boolean wallpaperOnly =
                WALLPAPER_ONLY.equals(getIntent().getStringExtra(WALLPAPER_FLAVOR_EXTRA));
        boolean provisioned = Settings.Global.getInt(getContentResolver(),
@@ -177,6 +180,12 @@ public class CustomizationPickerActivity extends FragmentActivity implements Wal
        }
    }

    @Override
    protected void onPause() {
        super.onPause();
        mIsSafeToCommitFragmentTransaction = false;
    }

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
@@ -447,6 +456,11 @@ public class CustomizationPickerActivity extends FragmentActivity implements Wal
        return mBottomActionBar;
    }

    @Override
    public boolean isSafeToCommitFragmentTransaction() {
        return mIsSafeToCommitFragmentTransaction;
    }

    /**
     * Represents a section of the Picker (eg "ThemeBundle", "Clock", etc).
     * There should be a concrete subclass per available section, providing the corresponding