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

Commit 6a1f25e2 authored by Santiago Etchebehere's avatar Santiago Etchebehere
Browse files

Add better logging when skipping Customizations

Log the details as we detect available customizations.
Also remove check for userdebug devices.

Bug: 132743160
Change-Id: I93352c0832d2f10ca0ec1887cc0137e46c885ee5
parent 5818e787
Loading
Loading
Loading
Loading
+9 −7
Original line number Original line Diff line number Diff line
@@ -159,6 +159,7 @@ public class CustomizationPickerActivity extends FragmentActivity implements Wal
    protected void onNewIntent(Intent intent) {
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        super.onNewIntent(intent);
        if (WALLPAPER_ONLY.equals(intent.getStringExtra(WALLPAPER_FLAVOR_EXTRA))) {
        if (WALLPAPER_ONLY.equals(intent.getStringExtra(WALLPAPER_FLAVOR_EXTRA))) {
            Log.d(TAG, "WALLPAPER_ONLY intent, reverting to Wallpaper Picker");
            skipToWallpaperPicker();
            skipToWallpaperPicker();
        }
        }
    }
    }
@@ -177,15 +178,11 @@ public class CustomizationPickerActivity extends FragmentActivity implements Wal
    private void initSections() {
    private void initSections() {
        mSections.clear();
        mSections.clear();
        if (!BuildCompat.isAtLeastQ()) {
        if (!BuildCompat.isAtLeastQ()) {
            return;
            Log.d(TAG, "Build version < Q detected");
        }
        //if (!BuildCompat.isAtLeastQ()) {
        //    return;
        //}
        if (Build.TYPE.equals("user")) {
            return;
            return;
        }
        }
        if (WALLPAPER_ONLY.equals(getIntent().getStringExtra(WALLPAPER_FLAVOR_EXTRA))) {
        if (WALLPAPER_ONLY.equals(getIntent().getStringExtra(WALLPAPER_FLAVOR_EXTRA))) {
            Log.d(TAG, "WALLPAPER_ONLY intent");
            return;
            return;
        }
        }
        //Theme
        //Theme
@@ -200,12 +197,16 @@ public class CustomizationPickerActivity extends FragmentActivity implements Wal
                mWallpaperSetter, new OverlayManagerCompat(this), eventLogger);
                mWallpaperSetter, new OverlayManagerCompat(this), eventLogger);
        if (themeManager.isAvailable()) {
        if (themeManager.isAvailable()) {
            mSections.put(R.id.nav_theme, new ThemeSection(R.id.nav_theme, themeManager));
            mSections.put(R.id.nav_theme, new ThemeSection(R.id.nav_theme, themeManager));
        } else {
            Log.d(TAG, "ThemeManager not available, removing Style section");
        }
        }
        //Clock
        //Clock
        ClockManager clockManager = new ClockManager(getContentResolver(),
        ClockManager clockManager = new ClockManager(getContentResolver(),
                new ContentProviderClockProvider(this), eventLogger);
                new ContentProviderClockProvider(this), eventLogger);
        if (clockManager.isAvailable()) {
        if (clockManager.isAvailable()) {
            mSections.put(R.id.nav_clock, new ClockSection(R.id.nav_clock, clockManager));
            mSections.put(R.id.nav_clock, new ClockSection(R.id.nav_clock, clockManager));
        } else {
            Log.d(TAG, "ClockManager not available, removing Clock section");
        }
        }
        //Grid
        //Grid
        GridOptionsManager gridManager = new GridOptionsManager(
        GridOptionsManager gridManager = new GridOptionsManager(
@@ -214,9 +215,10 @@ public class CustomizationPickerActivity extends FragmentActivity implements Wal
                eventLogger);
                eventLogger);
        if (gridManager.isAvailable()) {
        if (gridManager.isAvailable()) {
            mSections.put(R.id.nav_grid, new GridSection(R.id.nav_grid, gridManager));
            mSections.put(R.id.nav_grid, new GridSection(R.id.nav_grid, gridManager));
        } else {
            Log.d(TAG, "GridOptionsManager not available, removing Grid section");
        }
        }
        mSections.put(R.id.nav_wallpaper, new WallpaperSection(R.id.nav_wallpaper));
        mSections.put(R.id.nav_wallpaper, new WallpaperSection(R.id.nav_wallpaper));
        //TODO (santie): add other sections if supported by the device
    }
    }


    private void setUpBottomNavView() {
    private void setUpBottomNavView() {