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

Commit 1801b2c3 authored by Clark Scheff's avatar Clark Scheff Committed by Gerrit Code Review
Browse files

Merge "CM11 Themes: Expose applyDefaultTheme to public service" into cm-11.0

parents a97b0d35 504d42be
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ interface IThemeService {
    void removeUpdates(in IThemeChangeListener listener);

    void requestThemeChange(String pkgName, in List<String> components);
    void applyDefaultTheme();
    boolean isThemeApplying(String pkgName);
    int getProgress(String pkgName);
}
+8 −0
Original line number Diff line number Diff line
@@ -123,6 +123,14 @@ public class ThemeManager {
        }
    }

    public void applyDefaultTheme() {
        try {
            mService.applyDefaultTheme();
        } catch (RemoteException e) {
            Log.w(TAG, "Unable to access ThemeService", e);
        }
    }

    public boolean isThemeApplying(String pkgName) {
        try {
            return mService.isThemeApplying(pkgName);
+1 −2
Original line number Diff line number Diff line
@@ -131,7 +131,6 @@ public class ThemeService extends IThemeService.Stub {
    }

    public void systemRunning() {
        applyDefaultThemeIfFirstBoot();
    }

    private void doApplyTheme(String pkgName, List<String> components) {
@@ -662,7 +661,7 @@ public class ThemeService extends IThemeService.Stub {
            anim.delete();
    }

    public void applyDefaultThemeIfFirstBoot() {
    public void applyDefaultTheme() {
        mContext.enforceCallingOrSelfPermission(
                Manifest.permission.ACCESS_THEME_MANAGER, null);
        final ContentResolver resolver = mContext.getContentResolver();