Loading src/com/android/launcher3/touch/ItemClickHandler.java +11 −4 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,7 @@ import static com.android.launcher3.model.data.ItemInfoWithIcon.FLAG_DISABLED_SU import android.app.AlertDialog; import android.app.AlertDialog; import android.app.PendingIntent; import android.app.PendingIntent; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Context; import android.content.Intent; import android.content.Intent; import android.content.IntentSender; import android.content.IntentSender; Loading Loading @@ -315,11 +316,17 @@ public class ItemClickHandler { */ */ public static void onClickSearchAction(Launcher launcher, SearchActionItemInfo itemInfo) { public static void onClickSearchAction(Launcher launcher, SearchActionItemInfo itemInfo) { if (itemInfo.getIntent() != null) { if (itemInfo.getIntent() != null) { try { if (itemInfo.hasFlags(SearchActionItemInfo.FLAG_SHOULD_START_FOR_RESULT)) { if (itemInfo.hasFlags(SearchActionItemInfo.FLAG_SHOULD_START_FOR_RESULT)) { launcher.startActivityForResult(itemInfo.getIntent(), 0); launcher.startActivityForResult(itemInfo.getIntent(), 0); } else { } else { launcher.startActivity(itemInfo.getIntent()); launcher.startActivity(itemInfo.getIntent()); } } } catch (ActivityNotFoundException e) { Toast.makeText(launcher, launcher.getResources().getText(R.string.shortcut_not_available), Toast.LENGTH_SHORT).show(); } } else if (itemInfo.getPendingIntent() != null) { } else if (itemInfo.getPendingIntent() != null) { try { try { PendingIntent pendingIntent = itemInfo.getPendingIntent(); PendingIntent pendingIntent = itemInfo.getPendingIntent(); Loading Loading
src/com/android/launcher3/touch/ItemClickHandler.java +11 −4 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,7 @@ import static com.android.launcher3.model.data.ItemInfoWithIcon.FLAG_DISABLED_SU import android.app.AlertDialog; import android.app.AlertDialog; import android.app.PendingIntent; import android.app.PendingIntent; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Context; import android.content.Intent; import android.content.Intent; import android.content.IntentSender; import android.content.IntentSender; Loading Loading @@ -315,11 +316,17 @@ public class ItemClickHandler { */ */ public static void onClickSearchAction(Launcher launcher, SearchActionItemInfo itemInfo) { public static void onClickSearchAction(Launcher launcher, SearchActionItemInfo itemInfo) { if (itemInfo.getIntent() != null) { if (itemInfo.getIntent() != null) { try { if (itemInfo.hasFlags(SearchActionItemInfo.FLAG_SHOULD_START_FOR_RESULT)) { if (itemInfo.hasFlags(SearchActionItemInfo.FLAG_SHOULD_START_FOR_RESULT)) { launcher.startActivityForResult(itemInfo.getIntent(), 0); launcher.startActivityForResult(itemInfo.getIntent(), 0); } else { } else { launcher.startActivity(itemInfo.getIntent()); launcher.startActivity(itemInfo.getIntent()); } } } catch (ActivityNotFoundException e) { Toast.makeText(launcher, launcher.getResources().getText(R.string.shortcut_not_available), Toast.LENGTH_SHORT).show(); } } else if (itemInfo.getPendingIntent() != null) { } else if (itemInfo.getPendingIntent() != null) { try { try { PendingIntent pendingIntent = itemInfo.getPendingIntent(); PendingIntent pendingIntent = itemInfo.getPendingIntent(); Loading