Add facility to run setup wizard after an update.

The system now keeps a tag of the last version (just an arbitrary string)
that the setup wizard was run for.  If this is different than the current
one in the setup wizard, then setup is launched at boot.

This introduces a new intent action for the part of the setup wizard that
gets run for an ungrade, which the system uses to find its current version
tag for comparing against what was last stored.  It is up to the launched
setup activity update the stored setting to reflect its current value,
once it is happy.
This commit is contained in:
Dianne Hackborn
2009-07-01 11:22:45 -07:00
parent cf098294da
commit d7cd29da91
4 changed files with 135 additions and 31 deletions

View File

@@ -1085,6 +1085,27 @@ public class Intent implements Parcelable {
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_POWER_USAGE_SUMMARY = "android.intent.action.POWER_USAGE_SUMMARY";
/**
* Activity Action: Setup wizard to launch after a platform update. This
* activity should have a string meta-data field associated with it,
* {@link #METADATA_SETUP_VERSION}, which defines the current version of
* the platform for setup. The activity will be launched only if
* {@link android.provider.Settings.Secure#LAST_SETUP_SHOWN} is not the
* same value.
* <p>Input: Nothing.
* <p>Output: Nothing.
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_UPGRADE_SETUP = "android.intent.action.UPGRADE_SETUP";
/**
* A string associated with a {@link #ACTION_UPGRADE_SETUP} activity
* describing the last run version of the platform that was setup.
* @hide
*/
public static final String METADATA_SETUP_VERSION = "android.SETUP_VERSION";
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Standard intent broadcast actions (see action variable).

View File

@@ -2237,6 +2237,13 @@ public final class Settings {
* @hide
*/
public static final String BACKUP_TRANSPORT = "backup_transport";
/**
* Version for which the setup wizard was last shown. Bumped for
* each release when there is new setup information to show.
* @hide
*/
public static final String LAST_SETUP_SHOWN = "last_setup_shown";
/**
* Helper method for determining if a location provider is enabled.