Permalink
Browse files

Avoid crashing when sharing Featured Art

Exception android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.hwCHOOSER flg=0x10000000 (has extras) }
android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:1643)
android.app.Instrumentation.execStartActivity (Instrumentation.java:1435)
android.app.ContextImpl.startActivity (ContextImpl.java:1115)
android.app.ContextImpl.startActivity (ContextImpl.java:1086)
android.content.ContextWrapper.startActivity (ContextWrapper.java:311)
com.google.android.apps.muzei.featuredart.FeaturedArtSource.onCustomCommand (FeaturedArtSource.java:155)
com.google.android.apps.muzei.api.MuzeiArtSource.processHandleCommand (MuzeiArtSource.java:786)
com.google.android.apps.muzei.api.MuzeiArtSource.onHandleIntent (MuzeiArtSource.java:690)
com.google.android.apps.muzei.api.MuzeiArtSource$ServiceHandler.handleMessage (MuzeiArtSource.java:311)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:136)
android.os.HandlerThread.run (HandlerThread.java:61)
  • Loading branch information...
ianhanniballake committed Oct 28, 2017
1 parent 597fb15 commit b2a2b8a93b64780d57266e872961af412e5cc182
@@ -152,7 +152,9 @@ public void run() {
+ detailUrl);
shareIntent = Intent.createChooser(shareIntent, "Share artwork");
shareIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(shareIntent);
if (shareIntent.resolveActivity(getPackageManager()) != null) {
startActivity(shareIntent);
}
} else if (COMMAND_ID_VIEW_ARCHIVE == id) {
CustomTabsIntent cti = new CustomTabsIntent.Builder()

0 comments on commit b2a2b8a

Please sign in to comment.