From 9c4f3e830a335364426bb08303a154c705e91053 Mon Sep 17 00:00:00 2001 From: John McCutchan Date: Tue, 27 Sep 2016 14:12:23 -0700 Subject: [PATCH] Make bundle path optional for the RUN intent (flutter/engine#3061) --- .../android/org/domokit/sky/shell/SkyActivity.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/platform/android/org/domokit/sky/shell/SkyActivity.java b/engine/src/flutter/shell/platform/android/org/domokit/sky/shell/SkyActivity.java index 312083514d..74172f436b 100644 --- a/engine/src/flutter/shell/platform/android/org/domokit/sky/shell/SkyActivity.java +++ b/engine/src/flutter/shell/platform/android/org/domokit/sky/shell/SkyActivity.java @@ -134,7 +134,14 @@ public class SkyActivity extends Activity { String action = intent.getAction(); if (Intent.ACTION_RUN.equals(action)) { String route = intent.getStringExtra("route"); - mView.runFromBundle(intent.getDataString(), + String appBundlePath = intent.getDataString(); + if (appBundlePath == null) { + // Fall back to the installation path if no bundle path + // was specified. + appBundlePath = + FlutterMain.findAppBundlePath(getApplicationContext()); + } + mView.runFromBundle(appBundlePath, intent.getStringExtra("snapshot")); if (route != null) mView.pushRoute(route);