Home | History | Annotate | Download | only in util

Lines Matching defs:intent

20 import android.content.Intent;
38 * Get an intent that will invoke the next step of setup wizard.
40 * @param originalIntent The original intent that was used to start the step, usually via
43 * @return A new intent that can be used with
44 * {@link android.app.Activity#startActivityForResult(Intent, int)} to start the next
47 public static Intent getNextIntent(Intent originalIntent, int resultCode) {
52 * Get an intent that will invoke the next step of setup wizard.
54 * @param originalIntent The original intent that was used to start the step, usually via
57 * @param data An intent containing extra result data.
58 * @return A new intent that can be used with
59 * {@link android.app.Activity#startActivityForResult(Intent, int)} to start the next
62 public static Intent getNextIntent(Intent originalIntent, int resultCode, Intent data) {
63 Intent intent = new Intent(ACTION_NEXT);
64 copyWizardManagerExtras(originalIntent, intent);
65 intent.putExtra(EXTRA_RESULT_CODE, resultCode);
67 intent.putExtras(data.getExtras());
70 return intent;
74 * Copy the internal extras used by setup wizard from one intent to another. For low-level use
75 * only, such as when using {@link Intent#FLAG_ACTIVITY_FORWARD_RESULT} to relay to another
76 * intent.
78 * @param srcIntent Intent to get the wizard manager extras from.
79 * @param dstIntent Intent to copy the wizard manager extras to.
81 public static void copyWizardManagerExtras(Intent srcIntent, Intent dstIntent) {
92 * Check whether an intent is intended to be used within the setup wizard flow.
94 * @param intent The intent to be checked, usually from
96 * @return true if the intent passed in was intended to be used with setup wizard.
98 public static boolean isSetupWizardIntent(Intent intent) {
99 return intent.getBooleanExtra(EXTRA_IS_FIRST_RUN, false);
103 * Check whether an intent is intended for the dealer.
105 * @param intent The intent to be checked, usually from
107 * @return true if the intent passed in was intended to be used with setup wizard.
109 public static boolean isDealerIntent(Intent intent) {
110 return intent.getBooleanExtra(EXTRA_IS_DEALER, false);