Skip to content

Commit

Permalink
Themes: setUserRequired(false) when updating audibles
Browse files Browse the repository at this point in the history
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
  • Loading branch information
0xD34D authored and nuclearmistake committed Aug 14, 2014
1 parent 95ed3fc commit 073bb2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions services/java/com/android/server/ThemeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
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;
Expand Down Expand Up @@ -196,6 +197,7 @@ private void doApplyTheme(Map<String, String> componentMap) {
incrementProgress(progressIncrement);
}

Environment.setUserRequired(false);
if (componentMap.containsKey(ThemesColumns.MODIFIES_ALARMS)) {
updateAlarms(componentMap.get(ThemesColumns.MODIFIES_ALARMS));
incrementProgress(progressIncrement);
Expand All @@ -210,6 +212,7 @@ private void doApplyTheme(Map<String, String> componentMap) {
updateBootAnim(componentMap.get(ThemesColumns.MODIFIES_BOOT_ANIM));
incrementProgress(progressIncrement);
}
Environment.setUserRequired(true);

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

0 comments on commit 073bb2a

Please sign in to comment.