Create a SkyShell.apk
This CL introduces a SkyShell.apk that is separate from the SkyDemo.apk that we
upload to the store to show our demos. The SkyShell.apk is just an empty shell
that can run Sky applications on Android.
diff --git a/packages/flutter/README.md b/packages/flutter/README.md
index fddf171..82113d2 100644
--- a/packages/flutter/README.md
+++ b/packages/flutter/README.md
@@ -68,19 +68,19 @@
-------------------------
The `sky` pub package includes a `sky_tool` script to assist in running
-Sky applications inside the `SkyDemo.apk` harness. The `sky_tool` script
+Sky applications inside the `SkyShell.apk` harness. The `sky_tool` script
expects to be run from the root directory of your application's package (i.e.,
the same directory that contains the `pubspec.yaml` file). To run your app,
follow these instructions:
- `./packages/sky/sky_tool start` to start the dev server and upload your
app to the device.
- (NOTE: add a `--install` flag to install `SkyDemo.apk` if it is not already
+ (NOTE: add a `--install` flag to install `SkyShell.apk` if it is not already
installed on the device.)
- Use `adb logcat` to view any errors or Dart `print()` output from the app.
`adb logcat -s sky` can be used to filter only adb messages from
- `SkyDemo.apk`.
+ `SkyShell.apk`.
Debugging
---------
diff --git a/packages/flutter/example/demo_launcher/apk/BUILD.gn b/packages/flutter/example/demo_launcher/apk/BUILD.gn
index 4d2443e..ae2e77e 100644
--- a/packages/flutter/example/demo_launcher/apk/BUILD.gn
+++ b/packages/flutter/example/demo_launcher/apk/BUILD.gn
@@ -17,10 +17,6 @@
"//base:base_java",
"//mojo/public/java:bindings",
"//mojo/public/java:system",
- "//mojo/services/sensors/public/interfaces:interfaces_java",
- "//services/sensors:sensors_lib",
- "//sky/services/media:media_lib",
- "//sky/services/media:interfaces_java",
"//sky/shell:java",
]
}
diff --git a/packages/flutter/example/demo_launcher/apk/org/domokit/sky/demo/SkyDemoApplication.java b/packages/flutter/example/demo_launcher/apk/org/domokit/sky/demo/SkyDemoApplication.java
index c5f6085..48f8a15 100644
--- a/packages/flutter/example/demo_launcher/apk/org/domokit/sky/demo/SkyDemoApplication.java
+++ b/packages/flutter/example/demo_launcher/apk/org/domokit/sky/demo/SkyDemoApplication.java
@@ -6,15 +6,7 @@
import android.content.Context;
-import org.chromium.mojo.sensors.SensorServiceImpl;
-import org.chromium.mojo.system.Core;
-import org.chromium.mojo.system.MessagePipeHandle;
-import org.chromium.mojom.media.MediaService;
-import org.chromium.mojom.sensors.SensorService;
-import org.domokit.media.MediaServiceImpl;
import org.domokit.sky.shell.ResourceExtractor;
-import org.domokit.sky.shell.ServiceFactory;
-import org.domokit.sky.shell.ServiceRegistry;
import org.domokit.sky.shell.SkyApplication;
/**
@@ -35,23 +27,4 @@
super.onBeforeResourceExtraction(extractor);
extractor.addResources(DEMO_RESOURCES);
}
-
- @Override
- public void onServiceRegistryAvailable(ServiceRegistry registry) {
- super.onServiceRegistryAvailable(registry);
-
- registry.register(SensorService.MANAGER.getName(), new ServiceFactory() {
- @Override
- public void connectToService(Context context, Core core, MessagePipeHandle pipe) {
- SensorService.MANAGER.bind(new SensorServiceImpl(context), pipe);
- }
- });
-
- registry.register(MediaService.MANAGER.getName(), new ServiceFactory() {
- @Override
- public void connectToService(Context context, Core core, MessagePipeHandle pipe) {
- MediaService.MANAGER.bind(new MediaServiceImpl(context, core), pipe);
- }
- });
- }
}
diff --git a/packages/flutter/lib/sky_tool b/packages/flutter/lib/sky_tool
index fa29631..1ab9b2c 100755
--- a/packages/flutter/lib/sky_tool
+++ b/packages/flutter/lib/sky_tool
@@ -21,9 +21,9 @@
SKY_SERVER_PORT = 9888
OBSERVATORY_PORT = 8181
-APK_NAME = 'SkyDemo.apk'
-ANDROID_PACKAGE = "org.domokit.sky.demo"
-ANDROID_COMPONENT = '%s/%s.SkyDemoActivity' % (ANDROID_PACKAGE, ANDROID_PACKAGE)
+APK_NAME = 'SkyShell.apk'
+ANDROID_PACKAGE = "org.domokit.sky.shell"
+ANDROID_COMPONENT = '%s/%s.SkyActivity' % (ANDROID_PACKAGE, ANDROID_PACKAGE)
# FIXME: This assumes adb is in $PATH, we could look for ANDROID_HOME, etc?
ADB_PATH = 'adb'
# FIXME: Do we need to look in $DART_SDK?
@@ -243,7 +243,7 @@
def run(self, args, pids):
subprocess.check_output([ADB_PATH, 'shell',
'am', 'broadcast',
- '-a', 'org.domokit.sky.demo.TRACING_START'])
+ '-a', 'org.domokit.sky.shell.TRACING_START'])
TRACE_COMPLETE_REGEXP = re.compile('Trace complete')
@@ -260,7 +260,7 @@
subprocess.check_output([ADB_PATH, 'logcat', '-c'])
subprocess.check_output([ADB_PATH, 'shell',
'am', 'broadcast',
- '-a', 'org.domokit.sky.demo.TRACING_STOP'])
+ '-a', 'org.domokit.sky.shell.TRACING_STOP'])
device_path = None
is_complete = False
while not is_complete: