Skip to content

Commit

Permalink
Forward weather intent through Pixel Bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
amirzaidi committed May 19, 2019
1 parent 8fe45b4 commit b460ea7
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,12 @@ void click(View view) {
"com.google.android.apps.gsa.velour.DynamicActivityTrampoline"));
}

launcher.startActivitySafely(view, internal, null);
Intent forward = new Intent();
forward.setPackage("com.google.android.apps.nexuslauncher");
forward.setComponent(new ComponentName(forward.getPackage(), "amirz.aidlbridge.GoogleDestForwarder"));
forward.putExtra("launch", internal.toUri(Intent.URI_INTENT_SCHEME));
forward.putExtra("launchOptions", launcher.getActivityLaunchOptions(view));
launcher.sendBroadcast(forward);
} catch (URISyntaxException | NullPointerException | SecurityException e) {
e.printStackTrace();
launcher.startActivitySafely(view, intent, null);
Expand Down

0 comments on commit b460ea7

Please sign in to comment.