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:
parent
79840ecb4e
commit
c330e50723
@ -19,8 +19,6 @@
|
|||||||
android:versionCode="3"
|
android:versionCode="3"
|
||||||
android:sharedUserId="android.uid.system">
|
android:sharedUserId="android.uid.system">
|
||||||
|
|
||||||
<original-package android:name="com.cyanogenmod.account" />
|
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
|
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
|
||||||
<uses-permission android:name="android.permission.STATUS_BAR" />
|
<uses-permission android:name="android.permission.STATUS_BAR" />
|
||||||
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
|
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
|
||||||
@ -46,6 +44,7 @@
|
|||||||
<uses-permission android:name="android.permission.HARDWARE_ABSTRACTION_ACCESS" />
|
<uses-permission android:name="android.permission.HARDWARE_ABSTRACTION_ACCESS" />
|
||||||
<uses-permission android:name="android.permission.BACKUP" />
|
<uses-permission android:name="android.permission.BACKUP" />
|
||||||
<uses-permission android:name="org.whispersystems.whisperpush.permissions.REGISTER" />
|
<uses-permission android:name="org.whispersystems.whisperpush.permissions.REGISTER" />
|
||||||
|
<uses-permission android:name="cyanogenmod.permission.FINISH_SETUP" />
|
||||||
|
|
||||||
<permission
|
<permission
|
||||||
android:name="cyanogenmod.permission.PROTECTED_APP"
|
android:name="cyanogenmod.permission.PROTECTED_APP"
|
||||||
|
@ -111,14 +111,14 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
|
|||||||
try {
|
try {
|
||||||
if (Settings.Secure.getInt(getContentResolver(),
|
if (Settings.Secure.getInt(getContentResolver(),
|
||||||
Settings.Secure.USER_SETUP_COMPLETE) == 1) {
|
Settings.Secure.USER_SETUP_COMPLETE) == 1) {
|
||||||
finishSetup();
|
finishSetup(false);
|
||||||
}
|
}
|
||||||
} catch (Settings.SettingNotFoundException e) {
|
} catch (Settings.SettingNotFoundException e) {
|
||||||
// Continue with setup
|
// Continue with setup
|
||||||
}
|
}
|
||||||
mIsGuestUser = SetupWizardUtils.isGuestUser(this);
|
mIsGuestUser = SetupWizardUtils.isGuestUser(this);
|
||||||
if (mIsGuestUser) {
|
if (mIsGuestUser) {
|
||||||
finishSetup();
|
finishSetup(false);
|
||||||
}
|
}
|
||||||
registerReceiver(mSetupData, mSetupData.getIntentFilter());
|
registerReceiver(mSetupData, mSetupData.getIntentFilter());
|
||||||
}
|
}
|
||||||
@ -289,7 +289,7 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
|
|||||||
mHandler.post(new Runnable() {
|
mHandler.post(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
finishSetup();
|
finishSetup(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -303,9 +303,9 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
|
|||||||
anim.start();
|
anim.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void finishSetup() {
|
private void finishSetup(boolean broadcastFinish) {
|
||||||
SetupWizardApp setupWizardApp = (SetupWizardApp)getApplication();
|
SetupWizardApp setupWizardApp = (SetupWizardApp)getApplication();
|
||||||
if (!mIsGuestUser) {
|
if (broadcastFinish && !mIsGuestUser) {
|
||||||
setupWizardApp.sendBroadcastAsUser(new Intent(SetupWizardApp.ACTION_FINISHED),
|
setupWizardApp.sendBroadcastAsUser(new Intent(SetupWizardApp.ACTION_FINISHED),
|
||||||
UserHandle.getCallingUserHandle());
|
UserHandle.getCallingUserHandle());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user