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

Commit a30f0366 authored by Santiago Etchebehere's avatar Santiago Etchebehere
Browse files

Merging from ub-launcher3-rvc-qpr-dev @ build 6827161

Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-rvc-qpr-dev_rvc-qpr-dev_6827161.html

Change-Id: I1407faf035596ddee7cf4ca58a98c1bd82eb5699
parents 45f8faa5 9020c8d7
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