SetupWizard: Don't crash on upgrade from 11
There is no need to have an original package as there is no data to persist. Change-Id: Ibfa2be22cb20e5c8a93dd2646da0e4f1db2f89ef
This commit is contained in:
@@ -111,14 +111,14 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
|
||||
try {
|
||||
if (Settings.Secure.getInt(getContentResolver(),
|
||||
Settings.Secure.USER_SETUP_COMPLETE) == 1) {
|
||||
finishSetup();
|
||||
finishSetup(false);
|
||||
}
|
||||
} catch (Settings.SettingNotFoundException e) {
|
||||
// Continue with setup
|
||||
}
|
||||
mIsGuestUser = SetupWizardUtils.isGuestUser(this);
|
||||
if (mIsGuestUser) {
|
||||
finishSetup();
|
||||
finishSetup(false);
|
||||
}
|
||||
registerReceiver(mSetupData, mSetupData.getIntentFilter());
|
||||
}
|
||||
@@ -289,7 +289,7 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
|
||||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
finishSetup();
|
||||
finishSetup(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -303,9 +303,9 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
|
||||
anim.start();
|
||||
}
|
||||
|
||||
private void finishSetup() {
|
||||
private void finishSetup(boolean broadcastFinish) {
|
||||
SetupWizardApp setupWizardApp = (SetupWizardApp)getApplication();
|
||||
if (!mIsGuestUser) {
|
||||
if (broadcastFinish && !mIsGuestUser) {
|
||||
setupWizardApp.sendBroadcastAsUser(new Intent(SetupWizardApp.ACTION_FINISHED),
|
||||
UserHandle.getCallingUserHandle());
|
||||
}
|
||||
|
Reference in New Issue
Block a user