Fix Material You themeing issue.

This commit is contained in:
Alex Ning 2021-06-17 12:35:37 +08:00
parent 18ecb62605
commit 92a1c1d1ae
2 changed files with 3 additions and 8 deletions

View File

@ -3,19 +3,13 @@ package ml.docilealligator.infinityforreddit.broadcastreceivers;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import java.util.Objects;
import ml.docilealligator.infinityforreddit.services.MaterialYouService;
public class WallpaperChangeReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Log.i("asfasdf", "s " + intent.getAction());
if (Objects.equals(intent.getAction(), "android.intent.action.WALLPAPER_CHANGED")) {
Intent materialYouIntent = new Intent(context, MaterialYouService.class);
context.startService(materialYouIntent);
}
Intent materialYouIntent = new Intent(context, MaterialYouService.class);
context.startService(materialYouIntent);
}
}

View File

@ -45,6 +45,7 @@ public class MaterialYouUtils {
.putInt(CustomThemeSharedPreferencesUtils.COLOR_PRIMARY_LIGHT_THEME, colorPrimaryInt)
.putInt(CustomThemeSharedPreferencesUtils.BACKGROUND_COLOR, backgroundColor)
.putInt(CustomThemeSharedPreferencesUtils.CARD_VIEW_BACKGROUND_COLOR, cardViewBackgroundColor)
.putInt(CustomThemeSharedPreferencesUtils.COMMENT_BACKGROUND_COLOR, cardViewBackgroundColor)
.putInt(CustomThemeSharedPreferencesUtils.BOTTOM_APP_BAR_BACKGROUND_COLOR, colorPrimaryInt)
.putInt(CustomThemeSharedPreferencesUtils.NAV_BAR_COLOR, colorPrimaryInt)
.putInt(CustomThemeSharedPreferencesUtils.PRIMARY_TEXT_COLOR, backgroundColorAppropriateTextColor)