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 final ArrayList<Runnable> mFinishRunnables = new ArrayList<Runnable>();
|
||||||
|
|
||||||
private ThemeManager.ThemeChangeListener mThemeChangeListener = new ThemeManager.ThemeChangeListener() {
|
private ThemeManager.ThemeChangeListener mThemeChangeListener;
|
||||||
@Override
|
|
||||||
public void onProgress(int progress) {
|
|
||||||
if (progress > 0) {
|
|
||||||
mFinishingProgressBar.setIndeterminate(false);
|
|
||||||
mFinishingProgressBar.setProgress(progress);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFinish(boolean isSuccess) {
|
|
||||||
finishSetup();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@ -305,6 +292,20 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
|
|||||||
mFinishingProgressBar.setIndeterminate(true);
|
mFinishingProgressBar.setIndeterminate(true);
|
||||||
mFinishingProgressBar.startAnimation(fadeIn);
|
mFinishingProgressBar.startAnimation(fadeIn);
|
||||||
final ThemeManager tm = (ThemeManager) getSystemService(Context.THEME_SERVICE);
|
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);
|
tm.addClient(mThemeChangeListener);
|
||||||
mSetupData.finishPages();
|
mSetupData.finishPages();
|
||||||
SetupStats.addEvent(SetupStats.Categories.APP_FINISHED, TAG,
|
SetupStats.addEvent(SetupStats.Categories.APP_FINISHED, TAG,
|
||||||
|
Loading…
Reference in New Issue
Block a user