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

Commit 5fb70d5c authored by Clark Scheff's avatar Clark Scheff Committed by Gerrit Code Review
Browse files

Themes: setUserRequired(false) when updating audibles

This prevents the following exception
F/Environment(18007): Path requests must specify a user by using UserEnvironment
F/Environment(18007): java.lang.Throwable
F/Environment(18007):   at android.os.Environment.throwIfUserRequired(Environment.java:787)

Change-Id: Ic6ac7537079ed27912c40683c877e05992b708e9
parent 750c44fe
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ import android.graphics.BitmapFactory;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Binder;
import android.os.Environment;
import android.os.FileUtils;
import android.os.Handler;
import android.os.HandlerThread;
@@ -196,6 +197,7 @@ public class ThemeService extends IThemeService.Stub {
            incrementProgress(progressIncrement);
        }

        Environment.setUserRequired(false);
        if (componentMap.containsKey(ThemesColumns.MODIFIES_ALARMS)) {
            updateAlarms(componentMap.get(ThemesColumns.MODIFIES_ALARMS));
            incrementProgress(progressIncrement);
@@ -210,6 +212,7 @@ public class ThemeService extends IThemeService.Stub {
            updateBootAnim(componentMap.get(ThemesColumns.MODIFIES_BOOT_ANIM));
            incrementProgress(progressIncrement);
        }
        Environment.setUserRequired(true);

        if (componentMap.containsKey(ThemesColumns.MODIFIES_FONTS)) {
            updateFonts(componentMap.get(ThemesColumns.MODIFIES_FONTS));