SetupWizard: Make sure we have this activities themechange listener
Change-Id: Iae69f1d7df2b3c032a187eda3593ea83fe0d9196
This commit is contained in:
parent
ef4cd78d5f
commit
226687c0b2
@ -76,20 +76,7 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
|
||||
|
||||
private final ArrayList<Runnable> mFinishRunnables = new ArrayList<Runnable>();
|
||||
|
||||
private ThemeManager.ThemeChangeListener mThemeChangeListener = new ThemeManager.ThemeChangeListener() {
|
||||
@Override
|
||||
public void onProgress(int progress) {
|
||||
if (progress > 0) {
|
||||
mFinishingProgressBar.setIndeterminate(false);
|
||||
mFinishingProgressBar.setProgress(progress);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish(boolean isSuccess) {
|
||||
finishSetup();
|
||||
}
|
||||
};
|
||||
private ThemeManager.ThemeChangeListener mThemeChangeListener;
|
||||
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@ -305,6 +292,20 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
|
||||
mFinishingProgressBar.setIndeterminate(true);
|
||||
mFinishingProgressBar.startAnimation(fadeIn);
|
||||
final ThemeManager tm = (ThemeManager) getSystemService(Context.THEME_SERVICE);
|
||||
mThemeChangeListener = new ThemeManager.ThemeChangeListener() {
|
||||
@Override
|
||||
public void onProgress(int progress) {
|
||||
if (progress > 0) {
|
||||
mFinishingProgressBar.setIndeterminate(false);
|
||||
mFinishingProgressBar.setProgress(progress);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish(boolean isSuccess) {
|
||||
finishSetup();
|
||||
}
|
||||
};
|
||||
tm.addClient(mThemeChangeListener);
|
||||
mSetupData.finishPages();
|
||||
SetupStats.addEvent(SetupStats.Categories.APP_FINISHED, TAG,
|
||||
|
Loading…
Reference in New Issue
Block a user