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

Commit 31b75521 authored by Chris Poultney's avatar Chris Poultney
Browse files

Update current wallpaper using wallpaper changed intent

See video for fix: b/411633819#comment3

Fixes: 411633819
Flag: EXEMPT bugfix
Test: manually per CL description
Change-Id: I21b3055ffcf721efc7dc8a9c8e339141fbbad78d
parent 5dfe09d2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import com.android.wallpaper.module.PartnerProvider
import com.android.wallpaper.module.WallpaperPreferences
import com.android.wallpaper.module.logging.UserEventLogger
import com.android.wallpaper.network.Requester
import com.android.wallpaper.picker.broadcast.BroadcastDispatcher
import com.android.wallpaper.picker.category.wrapper.WallpaperCategoryWrapper
import com.android.wallpaper.picker.customization.data.repository.WallpaperColorsRepository
import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor
@@ -48,6 +49,7 @@ constructor(
    testStatusNotifier: TestPackageStatusNotifier,
    currentWallpaperInfoFactory: FakeCurrentWallpaperInfoFactory,
    wallpaperRefresher: FakeWallpaperRefresher,
    broadcastDispatcher: BroadcastDispatcher,
) :
    TestInjector(
        themesUserEventLogger,
@@ -62,6 +64,7 @@ constructor(
        testStatusNotifier,
        currentWallpaperInfoFactory,
        wallpaperRefresher,
        broadcastDispatcher,
    ),
    CustomizationInjector {
    /////////////////
+5 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.customization.model.picker.quickaffordance.ui.viewmodel

import android.content.Context
import android.content.Intent
import android.os.Looper
import androidx.test.core.app.ApplicationProvider
import androidx.test.filters.SmallTest
import com.android.customization.module.logging.TestThemesUserEventLogger
@@ -36,6 +37,7 @@ import com.android.wallpaper.module.InjectorProvider
import com.android.wallpaper.module.NetworkStatusNotifier
import com.android.wallpaper.module.PartnerProvider
import com.android.wallpaper.network.Requester
import com.android.wallpaper.picker.broadcast.BroadcastDispatcher
import com.android.wallpaper.picker.category.wrapper.WallpaperCategoryWrapper
import com.android.wallpaper.picker.common.icon.ui.viewmodel.Icon
import com.android.wallpaper.picker.common.text.ui.viewmodel.Text
@@ -93,6 +95,7 @@ class KeyguardQuickAffordancePickerViewModelTest {
        val prefs = TestWallpaperPreferences()
        val refresher = FakeWallpaperRefresher(prefs)
        val wallpaperInfoFactory = FakeCurrentWallpaperInfoFactory(refresher)
        val broadcastDispatcher = BroadcastDispatcher(context, Looper.getMainLooper())

        quickAffordanceInteractor =
            KeyguardQuickAffordancePickerInteractor(
@@ -112,6 +115,7 @@ class KeyguardQuickAffordancePickerViewModelTest {
                        client = FakeWallpaperClient(),
                        wallpaperPreferences = prefs,
                        backgroundDispatcher = testDispatcher,
                        broadcastDispatcher = broadcastDispatcher,
                    )
            )
        testPackageStatusNotifier = TestPackageStatusNotifier()
@@ -129,6 +133,7 @@ class KeyguardQuickAffordancePickerViewModelTest {
                testPackageStatusNotifier,
                wallpaperInfoFactory,
                refresher,
                broadcastDispatcher,
            )
        )
        underTest =