Lines Matching refs:intent
27 import android.content.Intent;
84 * When starting this activity, the invoking Intent can contain this extra
170 public void onReceive(Context context, Intent intent) {
171 String action = intent.getAction();
172 if (Intent.ACTION_BATTERY_CHANGED.equals(action)) {
173 boolean batteryPresent = Utils.isBatteryPresent(intent);
238 private static boolean isShortCutIntent(final Intent intent) {
239 Set<String> categories = intent.getCategories();
243 private static boolean isLikeShortCutIntent(final Intent intent) {
244 String action = intent.getAction();
267 final Intent intent = getIntent();
268 if (intent.hasExtra(EXTRA_UI_OPTIONS)) {
269 getWindow().setUiOptions(intent.getIntExtra(EXTRA_UI_OPTIONS, 0));
275 // Getting Intent properties can only be done after the super.onCreate(...)
276 final String initialFragmentName = intent.getStringExtra(EXTRA_SHOW_FRAGMENT);
278 mIsShortcut = isShortCutIntent(intent) || isLikeShortCutIntent(intent) ||
279 intent.getBooleanExtra(EXTRA_SHOW_FRAGMENT_AS_SHORTCUT, false);
281 final ComponentName cn = intent.getComponent();
288 // - or :settings:show_fragment_as_subsetting is passed to the Intent
290 intent.getBooleanExtra(EXTRA_SHOW_FRAGMENT_AS_SUBSETTING, false);
308 setTitleFromIntent(intent);
321 launchSettingFragment(initialFragmentName, isSubSettings, intent);
351 if (intent.getBooleanExtra(EXTRA_PREFS_SHOW_BUTTON_BAR, false)) {
380 if (intent.hasExtra(EXTRA_PREFS_SET_NEXT_TEXT)) {
381 String buttonText = intent.getStringExtra(EXTRA_PREFS_SET_NEXT_TEXT);
389 if (intent.hasExtra(EXTRA_PREFS_SET_BACK_TEXT)) {
390 String buttonText = intent.getStringExtra(EXTRA_PREFS_SET_BACK_TEXT);
398 if (intent.getBooleanExtra(EXTRA_PREFS_SHOW_SKIP, false)) {
410 void launchSettingFragment(String initialFragmentName, boolean isSubSettings, Intent intent) {
420 setTitleFromIntent(intent);
422 Bundle initialArguments = intent.getBundleExtra(EXTRA_SHOW_FRAGMENT_ARGUMENTS);
435 private void setTitleFromIntent(Intent intent) {
436 final int initialTitleResId = intent.getIntExtra(EXTRA_SHOW_FRAGMENT_TITLE_RESID, -1);
441 final String initialTitleResPackageName = intent.getStringExtra(
459 final String initialTitle = intent.getStringExtra(EXTRA_SHOW_FRAGMENT_TITLE);
532 registerReceiver(mBatteryInfoReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
563 public Intent getIntent() {
564 Intent superIntent = super.getIntent();
569 Intent modIntent = new Intent(superIntent);
577 args.putParcelable("intent", superIntent);
585 * Checks if the component name in the intent is different from the Settings class and
588 private String getStartingFragmentClass(Intent intent) {
591 String intentClass = intent.getComponent().getClassName();
619 * {@link #finishPreferencePanel(Fragment, int, Intent)} when done.
654 // Calling startWithFragmentAsUser() without specifying FLAG_ACTIVITY_NEW_TASK to the intent
659 // We work around this issue by adding FLAG_ACTIVITY_NEW_TASK to the intent, while doing
688 public void finishPreferencePanel(Fragment caller, int resultCode, Intent resultData) {
856 final ComponentName component = category.getTile(i).intent.getComponent();
914 public boolean shouldUpRecreateTask(Intent targetIntent) {
915 return super.shouldUpRecreateTask(new Intent(this, SettingsActivity.class));
918 public void startSuggestion(Intent intent) {
919 if (intent == null || ActivityManager.isUserAMonkey()) {
922 mCurrentSuggestion = intent.getComponent();
923 startActivityForResult(intent, REQUEST_SUGGESTION);
927 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
951 Intent intent = new Intent(this, SearchActivity.class);
952 startActivity(intent);