diff --git a/TEST_MAPPING b/TEST_MAPPING
index 6345ffb..560897b 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -2,6 +2,7 @@
   "presubmit": [
     {
       "name": "WallpaperPickerGoogleTests",
+      "keywords": ["internal"],
       "options": [
         {
           "exclude-annotation": "org.junit.Ignore"
diff --git a/src/com/android/customization/module/logging/StatsLogUserEventLogger.java b/src/com/android/customization/module/logging/StatsLogUserEventLogger.java
deleted file mode 100644
index 8ed30ff..0000000
--- a/src/com/android/customization/module/logging/StatsLogUserEventLogger.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.customization.module.logging;
-
-import static com.android.systemui.shared.system.SysUiStatsLog.STYLE_UICHANGED__ACTION__APP_LAUNCHED;
-import static com.android.systemui.shared.system.SysUiStatsLog.STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_CROP_AND_SET_ACTION;
-import static com.android.systemui.shared.system.SysUiStatsLog.STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_DEEP_LINK;
-import static com.android.systemui.shared.system.SysUiStatsLog.STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_LAUNCHER;
-import static com.android.systemui.shared.system.SysUiStatsLog.STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_LAUNCH_ICON;
-import static com.android.systemui.shared.system.SysUiStatsLog.STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_PREFERENCE_UNSPECIFIED;
-import static com.android.systemui.shared.system.SysUiStatsLog.STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_SETTINGS;
-import static com.android.systemui.shared.system.SysUiStatsLog.STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_SETTINGS_SEARCH;
-import static com.android.systemui.shared.system.SysUiStatsLog.STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_SUW;
-import static com.android.systemui.shared.system.SysUiStatsLog.STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_TIPS;
-import static com.android.wallpaper.util.LaunchSourceUtils.LAUNCH_SETTINGS_SEARCH;
-import static com.android.wallpaper.util.LaunchSourceUtils.LAUNCH_SOURCE_DEEP_LINK;
-import static com.android.wallpaper.util.LaunchSourceUtils.LAUNCH_SOURCE_LAUNCHER;
-import static com.android.wallpaper.util.LaunchSourceUtils.LAUNCH_SOURCE_SETTINGS;
-import static com.android.wallpaper.util.LaunchSourceUtils.LAUNCH_SOURCE_SUW;
-import static com.android.wallpaper.util.LaunchSourceUtils.LAUNCH_SOURCE_TIPS;
-import static com.android.wallpaper.util.LaunchSourceUtils.WALLPAPER_LAUNCH_SOURCE;
-
-import android.app.WallpaperManager;
-import android.content.Intent;
-import android.stats.style.StyleEnums;
-import android.text.TextUtils;
-
-import androidx.annotation.Nullable;
-
-import com.android.customization.model.color.ColorOption;
-import com.android.customization.model.grid.GridOption;
-import com.android.customization.module.SysUiStatsLogger;
-import com.android.wallpaper.module.WallpaperPreferences;
-import com.android.wallpaper.module.WallpaperStatusChecker;
-import com.android.wallpaper.module.logging.NoOpUserEventLogger;
-
-/**
- * StatsLog-backed implementation of {@link ThemesUserEventLogger}.
- */
-public class StatsLogUserEventLogger extends NoOpUserEventLogger implements ThemesUserEventLogger {
-
-    private final WallpaperPreferences mPreferences;
-    private final WallpaperStatusChecker mWallpaperStatusChecker;
-
-    public StatsLogUserEventLogger(
-            WallpaperPreferences preferences,
-            WallpaperStatusChecker wallpaperStatusChecker) {
-        mPreferences = preferences;
-        mWallpaperStatusChecker = wallpaperStatusChecker;
-    }
-
-    @Override
-    public void logAppLaunched(Intent launchSource) {
-        new SysUiStatsLogger(STYLE_UICHANGED__ACTION__APP_LAUNCHED)
-                .setLaunchedPreference(getAppLaunchSource(launchSource))
-                .log();
-    }
-
-    @Override
-    public void logActionClicked(String collectionId, int actionLabelResId) {
-        new SysUiStatsLogger(StyleEnums.WALLPAPER_EXPLORE)
-                .setWallpaperCategoryHash(getIdHashCode(collectionId))
-                .log();
-    }
-
-    @Override
-    public void logIndividualWallpaperSelected(String collectionId) {
-        new SysUiStatsLogger(StyleEnums.WALLPAPER_SELECT)
-                .setWallpaperCategoryHash(getIdHashCode(collectionId))
-                .log();
-    }
-
-    @Override
-    public void logCategorySelected(String collectionId) {
-        new SysUiStatsLogger(StyleEnums.WALLPAPER_OPEN_CATEGORY)
-                .setWallpaperCategoryHash(getIdHashCode(collectionId))
-                .log();
-    }
-
-    @Override
-    public void logSnapshot() {
-        final boolean isLockWallpaperSet = mWallpaperStatusChecker.isLockWallpaperSet();
-        final String homeCollectionId = mPreferences.getHomeWallpaperCollectionId();
-        final String homeRemoteId = mPreferences.getHomeWallpaperRemoteId();
-        final String effects = mPreferences.getHomeWallpaperEffects();
-        String homeWallpaperId = TextUtils.isEmpty(homeRemoteId)
-                ? mPreferences.getHomeWallpaperServiceName() : homeRemoteId;
-        String lockCollectionId = isLockWallpaperSet ? mPreferences.getLockWallpaperCollectionId()
-                : homeCollectionId;
-        String lockWallpaperId = isLockWallpaperSet ? mPreferences.getLockWallpaperRemoteId()
-                : homeWallpaperId;
-
-        new SysUiStatsLogger(StyleEnums.SNAPSHOT)
-                .setWallpaperCategoryHash(getIdHashCode(homeCollectionId))
-                .setWallpaperIdHash(getIdHashCode(homeWallpaperId))
-                .setLockWallpaperCategoryHash(getIdHashCode(lockCollectionId))
-                .setLockWallpaperIdHash(getIdHashCode(lockWallpaperId))
-                .setFirstLaunchDateSinceSetup(mPreferences.getFirstLaunchDateSinceSetup())
-                .setFirstWallpaperApplyDateSinceSetup(
-                        mPreferences.getFirstWallpaperApplyDateSinceSetup())
-                .setAppLaunchCount(mPreferences.getAppLaunchCount())
-                .setEffectIdHash(getIdHashCode(effects))
-                .log();
-    }
-
-    @Override
-    public void logWallpaperSet(String collectionId, @Nullable String wallpaperId,
-            @Nullable String effects) {
-        new SysUiStatsLogger(StyleEnums.WALLPAPER_APPLIED)
-                .setWallpaperCategoryHash(getIdHashCode(collectionId))
-                .setWallpaperIdHash(getIdHashCode(wallpaperId))
-                .setEffectIdHash(getIdHashCode(effects))
-                .log();
-    }
-
-    @Override
-    public void logEffectApply(String effect, @EffectStatus int status, long timeElapsedMillis,
-            int resultCode) {
-        new SysUiStatsLogger(StyleEnums.WALLPAPER_EFFECT_APPLIED)
-                .setEffectPreference(status)
-                .setEffectIdHash(getIdHashCode(effect))
-                .setTimeElapsed(timeElapsedMillis)
-                .setEffectResultCode(resultCode)
-                .log();
-    }
-
-    @Override
-    public void logEffectProbe(String effect, @EffectStatus int status) {
-        new SysUiStatsLogger(StyleEnums.WALLPAPER_EFFECT_PROBE)
-                .setEffectPreference(status)
-                .setEffectIdHash(getIdHashCode(effect))
-                .log();
-    }
-
-    @Override
-    public void logEffectForegroundDownload(String effect, @EffectStatus int status,
-            long timeElapsedMillis) {
-        new SysUiStatsLogger(StyleEnums.WALLPAPER_EFFECT_FG_DOWNLOAD)
-                .setEffectPreference(status)
-                .setEffectIdHash(getIdHashCode(effect))
-                .setTimeElapsed(timeElapsedMillis)
-                .log();
-    }
-
-    @Override
-    public void logColorApplied(int action, ColorOption colorOption) {
-        new SysUiStatsLogger(action)
-                .setColorPreference(colorOption.getIndex())
-                .setColorVariant(colorOption.getStyle().ordinal() + 1)
-                .log();
-    }
-
-    @Override
-    public void logGridSelected(GridOption grid) {
-        new SysUiStatsLogger(StyleEnums.PICKER_SELECT)
-                .setLauncherGrid(grid.cols)
-                .log();
-    }
-
-    @Override
-    public void logGridApplied(GridOption grid) {
-        new SysUiStatsLogger(StyleEnums.PICKER_APPLIED)
-                .setLauncherGrid(grid.cols)
-                .log();
-    }
-
-    private int getAppLaunchSource(Intent launchSource) {
-        if (launchSource.hasExtra(WALLPAPER_LAUNCH_SOURCE)) {
-            switch (launchSource.getStringExtra(WALLPAPER_LAUNCH_SOURCE)) {
-                case LAUNCH_SOURCE_LAUNCHER:
-                    return STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_LAUNCHER;
-                case LAUNCH_SOURCE_SETTINGS:
-                    return STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_SETTINGS;
-                case LAUNCH_SOURCE_SUW:
-                    return STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_SUW;
-                case LAUNCH_SOURCE_TIPS:
-                    return STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_TIPS;
-                case LAUNCH_SOURCE_DEEP_LINK:
-                    return STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_DEEP_LINK;
-                default:
-                    return STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_PREFERENCE_UNSPECIFIED;
-            }
-        } else if (launchSource.hasExtra(LAUNCH_SETTINGS_SEARCH)) {
-            return STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_SETTINGS_SEARCH;
-        } else if (launchSource.getAction() != null && launchSource.getAction().equals(
-                WallpaperManager.ACTION_CROP_AND_SET_WALLPAPER)) {
-            return STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_CROP_AND_SET_ACTION;
-        } else if (launchSource.getCategories() != null
-                && launchSource.getCategories().contains(Intent.CATEGORY_LAUNCHER)) {
-            return STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_LAUNCH_ICON;
-        } else {
-            return STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_PREFERENCE_UNSPECIFIED;
-        }
-    }
-
-    private int getIdHashCode(String id) {
-        return id != null ? id.hashCode() : 0;
-    }
-}
diff --git a/src/com/android/customization/module/logging/StatsLogUserEventLogger.kt b/src/com/android/customization/module/logging/StatsLogUserEventLogger.kt
new file mode 100644
index 0000000..6294e90
--- /dev/null
+++ b/src/com/android/customization/module/logging/StatsLogUserEventLogger.kt
@@ -0,0 +1,167 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.customization.module.logging
+
+import android.app.WallpaperManager
+import android.content.Intent
+import android.stats.style.StyleEnums
+import android.text.TextUtils
+import com.android.customization.model.color.ColorOption
+import com.android.customization.model.grid.GridOption
+import com.android.customization.module.SysUiStatsLogger
+import com.android.systemui.shared.system.SysUiStatsLog
+import com.android.wallpaper.module.WallpaperPreferences
+import com.android.wallpaper.module.WallpaperStatusChecker
+import com.android.wallpaper.module.logging.NoOpUserEventLogger
+import com.android.wallpaper.module.logging.UserEventLogger.Companion.EffectStatus
+import com.android.wallpaper.util.LaunchSourceUtils
+
+/** StatsLog-backed implementation of [ThemesUserEventLogger]. */
+class StatsLogUserEventLogger(
+    private val preferences: WallpaperPreferences,
+    private val wallpaperStatusChecker: WallpaperStatusChecker
+) : NoOpUserEventLogger(), ThemesUserEventLogger {
+
+    override fun logAppLaunched(launchSource: Intent) {
+        SysUiStatsLogger(SysUiStatsLog.STYLE_UICHANGED__ACTION__APP_LAUNCHED)
+            .setLaunchedPreference(getAppLaunchSource(launchSource))
+            .log()
+    }
+
+    override fun logActionClicked(collectionId: String, actionLabelResId: Int) {
+        SysUiStatsLogger(StyleEnums.WALLPAPER_EXPLORE)
+            .setWallpaperCategoryHash(getIdHashCode(collectionId))
+            .log()
+    }
+
+    override fun logSnapshot() {
+        val isLockWallpaperSet = wallpaperStatusChecker.isLockWallpaperSet()
+        val homeCollectionId = preferences.homeWallpaperCollectionId
+        val homeRemoteId = preferences.homeWallpaperRemoteId
+        val effects = preferences.homeWallpaperEffects
+        val homeWallpaperId =
+            if (TextUtils.isEmpty(homeRemoteId)) preferences.homeWallpaperServiceName
+            else homeRemoteId
+        val lockCollectionId =
+            if (isLockWallpaperSet) preferences.lockWallpaperCollectionId else homeCollectionId
+        val lockWallpaperId =
+            if (isLockWallpaperSet) preferences.lockWallpaperRemoteId else homeWallpaperId
+        SysUiStatsLogger(StyleEnums.SNAPSHOT)
+            .setWallpaperCategoryHash(getIdHashCode(homeCollectionId))
+            .setWallpaperIdHash(getIdHashCode(homeWallpaperId))
+            .setLockWallpaperCategoryHash(getIdHashCode(lockCollectionId))
+            .setLockWallpaperIdHash(getIdHashCode(lockWallpaperId))
+            .setFirstLaunchDateSinceSetup(preferences.firstLaunchDateSinceSetup)
+            .setFirstWallpaperApplyDateSinceSetup(preferences.firstWallpaperApplyDateSinceSetup)
+            .setAppLaunchCount(preferences.appLaunchCount)
+            .setEffectIdHash(getIdHashCode(effects))
+            .log()
+    }
+
+    override fun logWallpaperApplied(
+        collectionId: String?,
+        wallpaperId: String?,
+        effects: String?,
+    ) {
+        SysUiStatsLogger(StyleEnums.WALLPAPER_APPLIED)
+            .setWallpaperCategoryHash(getIdHashCode(collectionId))
+            .setWallpaperIdHash(getIdHashCode(wallpaperId))
+            .setEffectIdHash(getIdHashCode(effects))
+            .log()
+    }
+
+    override fun logEffectApply(
+        effect: String,
+        @EffectStatus status: Int,
+        timeElapsedMillis: Long,
+        resultCode: Int
+    ) {
+        SysUiStatsLogger(StyleEnums.WALLPAPER_EFFECT_APPLIED)
+            .setEffectPreference(status)
+            .setEffectIdHash(getIdHashCode(effect))
+            .setTimeElapsed(timeElapsedMillis)
+            .setEffectResultCode(resultCode)
+            .log()
+    }
+
+    override fun logEffectProbe(effect: String, @EffectStatus status: Int) {
+        SysUiStatsLogger(StyleEnums.WALLPAPER_EFFECT_PROBE)
+            .setEffectPreference(status)
+            .setEffectIdHash(getIdHashCode(effect))
+            .log()
+    }
+
+    override fun logEffectForegroundDownload(
+        effect: String,
+        @EffectStatus status: Int,
+        timeElapsedMillis: Long
+    ) {
+        SysUiStatsLogger(StyleEnums.WALLPAPER_EFFECT_FG_DOWNLOAD)
+            .setEffectPreference(status)
+            .setEffectIdHash(getIdHashCode(effect))
+            .setTimeElapsed(timeElapsedMillis)
+            .log()
+    }
+
+    override fun logColorApplied(action: Int, colorOption: ColorOption) {
+        SysUiStatsLogger(action)
+            .setColorPreference(colorOption.index)
+            .setColorVariant(colorOption.style.ordinal + 1)
+            .log()
+    }
+
+    override fun logGridApplied(grid: GridOption) {
+        SysUiStatsLogger(StyleEnums.PICKER_APPLIED).setLauncherGrid(grid.cols).log()
+    }
+
+    private fun getAppLaunchSource(launchSource: Intent): Int {
+        return if (launchSource.hasExtra(LaunchSourceUtils.WALLPAPER_LAUNCH_SOURCE)) {
+            when (launchSource.getStringExtra(LaunchSourceUtils.WALLPAPER_LAUNCH_SOURCE)) {
+                LaunchSourceUtils.LAUNCH_SOURCE_LAUNCHER ->
+                    SysUiStatsLog.STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_LAUNCHER
+                LaunchSourceUtils.LAUNCH_SOURCE_SETTINGS ->
+                    SysUiStatsLog.STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_SETTINGS
+                LaunchSourceUtils.LAUNCH_SOURCE_SUW ->
+                    SysUiStatsLog.STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_SUW
+                LaunchSourceUtils.LAUNCH_SOURCE_TIPS ->
+                    SysUiStatsLog.STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_TIPS
+                LaunchSourceUtils.LAUNCH_SOURCE_DEEP_LINK ->
+                    SysUiStatsLog.STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_DEEP_LINK
+                else ->
+                    SysUiStatsLog
+                        .STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_PREFERENCE_UNSPECIFIED
+            }
+        } else if (launchSource.hasExtra(LaunchSourceUtils.LAUNCH_SETTINGS_SEARCH)) {
+            SysUiStatsLog.STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_SETTINGS_SEARCH
+        } else if (
+            launchSource.action != null &&
+                launchSource.action == WallpaperManager.ACTION_CROP_AND_SET_WALLPAPER
+        ) {
+            SysUiStatsLog.STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_CROP_AND_SET_ACTION
+        } else if (
+            launchSource.categories != null &&
+                launchSource.categories.contains(Intent.CATEGORY_LAUNCHER)
+        ) {
+            SysUiStatsLog.STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_LAUNCH_ICON
+        } else {
+            SysUiStatsLog.STYLE_UICHANGED__LAUNCHED_PREFERENCE__LAUNCHED_PREFERENCE_UNSPECIFIED
+        }
+    }
+
+    private fun getIdHashCode(id: String?): Int {
+        return id?.hashCode() ?: 0
+    }
+}
diff --git a/src/com/android/customization/module/logging/ThemesUserEventLogger.java b/src/com/android/customization/module/logging/ThemesUserEventLogger.java
deleted file mode 100644
index cc16d09..0000000
--- a/src/com/android/customization/module/logging/ThemesUserEventLogger.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.customization.module.logging;
-
-import com.android.customization.model.color.ColorOption;
-import com.android.customization.model.grid.GridOption;
-import com.android.wallpaper.module.logging.UserEventLogger;
-
-/**
- * Extension of {@link UserEventLogger} that adds ThemePicker specific events.
- */
-public interface ThemesUserEventLogger extends UserEventLogger {
-
-    /**
-     * Logs the color usage while color is applied.
-     *
-     * @param action color applied action.
-     * @param colorOption applied color option.
-     */
-    void logColorApplied(int action, ColorOption colorOption);
-
-    /** */
-    void logGridSelected(GridOption grid);
-
-    /** */
-    void logGridApplied(GridOption grid);
-
-}
diff --git a/src/com/android/customization/module/logging/ThemesUserEventLogger.kt b/src/com/android/customization/module/logging/ThemesUserEventLogger.kt
new file mode 100644
index 0000000..4fd5334
--- /dev/null
+++ b/src/com/android/customization/module/logging/ThemesUserEventLogger.kt
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.customization.module.logging
+
+import com.android.customization.model.color.ColorOption
+import com.android.customization.model.grid.GridOption
+import com.android.wallpaper.module.logging.UserEventLogger
+
+/** Extension of [UserEventLogger] that adds ThemePicker specific events. */
+interface ThemesUserEventLogger : UserEventLogger {
+    /**
+     * Logs the color usage while color is applied.
+     *
+     * @param action color applied action.
+     * @param colorOption applied color option.
+     */
+    fun logColorApplied(action: Int, colorOption: ColorOption)
+
+    fun logGridApplied(grid: GridOption)
+}
diff --git a/tests/common/src/com/android/customization/testing/TestThemesUserEventLogger.java b/tests/common/src/com/android/customization/testing/TestThemesUserEventLogger.java
deleted file mode 100644
index 01bb91d..0000000
--- a/tests/common/src/com/android/customization/testing/TestThemesUserEventLogger.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.customization.testing;
-
-import com.android.customization.model.color.ColorOption;
-import com.android.customization.model.grid.GridOption;
-import com.android.customization.module.logging.ThemesUserEventLogger;
-import com.android.wallpaper.testing.TestUserEventLogger;
-
-/**
- * Test implementation of {@link ThemesUserEventLogger}.
- */
-public class TestThemesUserEventLogger extends TestUserEventLogger
-        implements ThemesUserEventLogger {
-    @Override
-    public void logColorApplied(int action, ColorOption colorOption) {
-        // Do nothing.
-    }
-
-    @Override
-    public void logGridSelected(GridOption grid) {
-        // Do nothing.
-    }
-
-    @Override
-    public void logGridApplied(GridOption grid) {
-        // Do nothing.
-    }
-}
diff --git a/tests/common/src/com/android/customization/testing/TestThemesUserEventLogger.kt b/tests/common/src/com/android/customization/testing/TestThemesUserEventLogger.kt
new file mode 100644
index 0000000..2236b62
--- /dev/null
+++ b/tests/common/src/com/android/customization/testing/TestThemesUserEventLogger.kt
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.customization.testing
+
+import com.android.customization.model.color.ColorOption
+import com.android.customization.model.grid.GridOption
+import com.android.customization.module.logging.ThemesUserEventLogger
+import com.android.wallpaper.testing.TestUserEventLogger
+
+/** Test implementation of [ThemesUserEventLogger]. */
+class TestThemesUserEventLogger : TestUserEventLogger(), ThemesUserEventLogger {
+
+    override fun logColorApplied(action: Int, colorOption: ColorOption) {}
+
+    override fun logGridApplied(grid: GridOption) {}
+}
