Themes: Refactor themes to CMSDK [6/6]
Change-Id: I26214e9a71f4d2f5f1b61cf3cabdcdb8bcc098b1 TICKET: CYNGNOS-2126
This commit is contained in:
parent
ca63326151
commit
8104310592
@ -37,7 +37,7 @@
|
||||
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />
|
||||
<uses-permission android:name="android.permission.MANAGE_USERS" />
|
||||
<uses-permission android:name="android.permission.CHANGE_COMPONENT_ENABLED_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_THEME_MANAGER"/>
|
||||
<uses-permission android:name="cyanogenmod.permission.ACCESS_THEME_MANAGER"/>
|
||||
<uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
|
||||
<uses-permission android:name="cyanogenmod.permission.HARDWARE_ABSTRACTION_ACCESS" />
|
||||
<uses-permission android:name="android.permission.BACKUP" />
|
||||
|
@ -22,7 +22,6 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.ThemeConfig;
|
||||
import android.content.res.ThemeManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.RemoteException;
|
||||
@ -49,6 +48,7 @@ import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
import cyanogenmod.hardware.CMHardwareManager;
|
||||
import cyanogenmod.providers.CMSettings;
|
||||
import cyanogenmod.themes.ThemeManager;
|
||||
|
||||
public class CyanogenSettingsPage extends SetupPage {
|
||||
|
||||
@ -148,7 +148,7 @@ public class CyanogenSettingsPage extends SetupPage {
|
||||
SetupStats.Label.CHECKED,
|
||||
String.valueOf(privacyData.getBoolean(KEY_APPLY_DEFAULT_THEME)));
|
||||
Log.i(TAG, "Applying default theme");
|
||||
final ThemeManager tm = (ThemeManager) mContext.getSystemService(Context.THEME_SERVICE);
|
||||
final ThemeManager tm = ThemeManager.getInstance();
|
||||
tm.applyDefaultTheme();
|
||||
|
||||
} else {
|
||||
|
@ -19,11 +19,9 @@ package com.cyanogenmod.setupwizard.ui;
|
||||
import android.animation.Animator;
|
||||
import android.app.Activity;
|
||||
import android.app.WallpaperManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.res.Resources;
|
||||
import android.content.res.ThemeManager;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Point;
|
||||
import android.os.AsyncTask;
|
||||
@ -49,6 +47,8 @@ import com.cyanogenmod.setupwizard.setup.SetupDataCallbacks;
|
||||
import com.cyanogenmod.setupwizard.util.EnableAccessibilityController;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
import cyanogenmod.themes.ThemeManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
@ -317,7 +317,7 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks,
|
||||
mFinishingProgressBar.setVisibility(View.VISIBLE);
|
||||
mFinishingProgressBar.setIndeterminate(true);
|
||||
mFinishingProgressBar.startAnimation(fadeIn);
|
||||
final ThemeManager tm = (ThemeManager) getSystemService(Context.THEME_SERVICE);
|
||||
final ThemeManager tm = ThemeManager.getInstance();
|
||||
tm.addClient(this);
|
||||
mSetupData.finishPages();
|
||||
}
|
||||
@ -433,8 +433,7 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks,
|
||||
if (mEnableAccessibilityController != null) {
|
||||
mEnableAccessibilityController.onDestroy();
|
||||
}
|
||||
final ThemeManager tm =
|
||||
(ThemeManager) SetupWizardActivity.this.getSystemService(THEME_SERVICE);
|
||||
final ThemeManager tm = ThemeManager.getInstance();
|
||||
tm.removeClient(SetupWizardActivity.this);
|
||||
SetupStats.sendEvents(SetupWizardActivity.this);
|
||||
SetupWizardUtils.disableGMSSetupWizard(SetupWizardActivity.this);
|
||||
|
Loading…
Reference in New Issue
Block a user