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

Commit 39eaaeb8 authored by Vinit Nayak's avatar Vinit Nayak
Browse files

Merging from ub-launcher3-master @ build 6269120

Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-master_rvc-dev_6269120.html

Change-Id: I01aa0a42e4d15cb00a723cb6dd50625ad743b722
parents 4bff19c5 e1a256eb
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -16,20 +16,20 @@
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- TODO (santie): replace icons with real ones when available -->
    <item
        android:id="@+id/nav_wallpaper"
        android:title="@string/wallpaper_title"
        android:icon="@drawable/ic_nav_wallpaper" />
    <item
        android:id="@+id/nav_theme"
        android:title="@string/theme_title"
        android:icon="@drawable/ic_nav_theme" />
    <item
        android:id="@+id/nav_clock"
        android:title="@string/clock_title"
        android:icon="@drawable/ic_nav_clock" />
    <item
        android:id="@+id/nav_grid"
        android:title="@string/grid_title"
        android:icon="@drawable/ic_nav_grid" />
    <item
        android:id="@+id/nav_wallpaper"
        android:title="@string/wallpaper_title"
        android:icon="@drawable/ic_nav_wallpaper" />
        android:id="@+id/nav_clock"
        android:title="@string/clock_title"
        android:icon="@drawable/ic_nav_clock" />
</menu>
 No newline at end of file
+19 −0
Original line number Diff line number Diff line
@@ -72,6 +72,25 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them
                0, 0, 0);
    }

    @Override
    public void logLiveWallpaperInfoSelected(String collectionId, @Nullable String wallpaperId) {
        SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.LIVE_WALLPAPER_INFO_SELECT,
                0, 0, 0, 0, 0,
                collectionId.hashCode(),
                wallpaperId != null ? wallpaperId.hashCode() : 0,
                0, 0);
    }

    @Override
    public void logLiveWallpaperCustomizeSelected(String collectionId,
            @Nullable String wallpaperId) {
        SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.LIVE_WALLPAPER_CUSTOMIZE_SELECT,
                0, 0, 0, 0, 0,
                collectionId.hashCode(),
                wallpaperId != null ? wallpaperId.hashCode() : 0,
                0, 0);
    }

    @Override
    public void logWallpaperSet(String collectionId, @Nullable String wallpaperId) {
        SysUiStatsLog.write(STYLE_UI_CHANGED, StyleEnums.WALLPAPER_APPLIED,
+8 −4
Original line number Diff line number Diff line
@@ -130,10 +130,9 @@ public class CustomizationPickerActivity extends FragmentActivity implements Wal

                // Navigate to the Wallpaper tab if we started directly from launcher, otherwise
                // start at the Styles tab
                int section = WALLPAPER_FOCUS.equals(getIntent()
                    .getStringExtra(WALLPAPER_FLAVOR_EXTRA))
                    ? mBottomNav.getMenu().size() - 1 : 0;
                navigateToSection(mBottomNav.getMenu().getItem(section).getItemId());
                navigateToSection(
                        WALLPAPER_FOCUS.equals(getIntent().getStringExtra(WALLPAPER_FLAVOR_EXTRA))
                                ? R.id.nav_wallpaper : R.id.nav_theme);
            }
        }
    }
@@ -306,6 +305,11 @@ public class CustomizationPickerActivity extends FragmentActivity implements Wal
    }

    private void navigateToSection(@IdRes int id) {
        // Navigate to the first section if the targeted section doesn't exist.
        if (!mSections.containsKey(id)) {
            id = mBottomNav.getMenu().getItem(0).getItemId();
        }

        mBottomNav.setSelectedItemId(id);
    }