Lines Matching refs:INTENT
29 import android.content.Intent;
30 import android.content.Intent.ShortcutIconResource;
316 Intent launchIntent,
431 final Intent launchIntent = a.getIntent();
583 modelShortcut.intent.filterEquals(shortcut.intent) &&
851 * we identify a shortcut by its title and intent.
853 static boolean shortcutExists(Context context, String title, Intent intent,
856 final Intent intentWithPkg, intentWithoutPkg;
858 if (intent.getComponent() != null) {
859 // If component is not null, an intent with null package will produce
861 if (intent.getPackage() != null) {
862 intentWithPkg = intent;
863 intentWithoutPkg = new Intent(intent).setPackage(null);
865 intentWithPkg = new Intent(intent).setPackage(
866 intent.getComponent().getPackageName());
867 intentWithoutPkg = intent;
870 intentWithPkg = intent;
871 intentWithoutPkg = intent;
876 new String[] { "title", "intent", "profileId" },
877 "title=? and (intent=? or intent=?) and profileId=?",
1276 public void onReceive(Context context, Intent intent) {
1277 if (DEBUG_RECEIVER) Log.d(TAG, "onReceive intent=" + intent);
1279 final String action = intent.getAction();
1280 if (Intent.ACTION_LOCALE_CHANGED.equals(action)) {
1283 } else if (Intent.ACTION_CONFIGURATION_CHANGED.equals(action)) {
1891 (LauncherSettings.Favorites.INTENT);
1932 Intent intent;
1956 intent = Intent.parseUri(intentDescription, 0);
1957 ComponentName cn = intent.getComponent();
1971 intent = null;
1973 // We allow auto install apps to have their intent
1975 intent = manager.getLaunchIntentForPackage(
1977 if (intent != null) {
1979 values.put(LauncherSettings.Favorites.INTENT,
1980 intent.toUri(0));
1987 if (intent == null) {
2067 info = getRestoredItemInfo(c, titleIndex, intent, promiseType);
2068 intent = getRestoredItemIntent(c, context, intent);
2076 info = getShortcutInfo(manager, intent, user, context, c,
2084 // didn't always have the correct intent flags set, so do that
2086 if (intent.getAction() != null &&
2087 intent.getCategories() != null &&
2088 intent.getAction().equals(Intent.ACTION_MAIN) &&
2089 intent.getCategories().contains(Intent.CATEGORY_LAUNCHER)) {
2090 intent.addFlags(
2091 Intent.FLAG_ACTIVITY_NEW_TASK |
2092 Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
2098 info.intent = intent;
2106 info.intent.putExtra(ItemInfo.EXTRA_PROFILE, serialNumber);
2108 if (isSafeMode && !Utilities.isSystemApp(context, intent)) {
2812 final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
2813 mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
2915 public void onReceive(Context context, Intent intent) {
3134 new Intent(Intent.ACTION_MAIN)
3135 .setComponent(cn).addCategory(Intent.CATEGORY_LAUNCHER),
3139 Intent intent = pm.getLaunchIntentForPackage(
3141 if (intent != null) {
3142 cn = intent.getComponent();
3146 if ((intent == null) || (appInfo == null)) {
3150 si.promisedIntent = intent;
3155 si.intent = si.promisedIntent;
3165 if (appInfo != null && Intent.ACTION_MAIN.equals(si.intent.getAction())
3301 Intent shortcutsIntent = new Intent(Intent.ACTION_CREATE_SHORTCUT);
3338 public ShortcutInfo getRestoredItemInfo(Cursor cursor, int titleIndex, Intent intent,
3342 mIconCache.getTitleAndIcon(info, intent, info.user, true);
3362 info.promisedIntent = intent;
3367 * Make an Intent object for a restored application or shortcut item that points
3370 private Intent getRestoredItemIntent(Cursor c, Context context, Intent intent) {
3371 ComponentName componentName = intent.getComponent();
3375 static Intent getMarketIntent(String packageName) {
3376 return new Intent(Intent.ACTION_VIEW)
3385 * This is called from the code that adds shortcuts from the intent receiver. This
3388 public ShortcutInfo getShortcutInfo(PackageManager manager, Intent intent,
3390 return getShortcutInfo(manager, intent, user, context, null, -1, -1, null, false);
3398 Intent intent,
3406 ComponentName componentName = intent.getComponent();
3412 Intent newIntent = new Intent(intent.getAction(), null);
3413 newIntent.addCategory(Intent.CATEGORY_LAUNCHER);
3601 ShortcutInfo infoFromShortcutIntent(Context context, Intent data) {
3602 Intent intent = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_INTENT);
3603 String name = data.getStringExtra(Intent.EXTRA_SHORTCUT_NAME);
3604 Parcelable bitmap = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_ICON);
3606 if (intent == null) {
3607 // If the intent is null, we can't construct a valid ShortcutInfo, so we return null
3608 Log.e(TAG, "Can't construct ShorcutInfo with null intent");
3620 Parcelable extra = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE);
3631 // users wouldn't get here without intent forwarding anyway.
3642 info.intent = intent;