| Index: shell/android/apk/src/org/chromium/mojo/shell/ShellService.java
|
| diff --git a/shell/android/apk/src/org/chromium/mojo/shell/ShellService.java b/shell/android/apk/src/org/chromium/mojo/shell/ShellService.java
|
| index 2f489fc1e5ba2cbe12bb6fb98c422d25b26847f2..c66906896ff5d3e7a7207404cf35da02ce42d1c3 100644
|
| --- a/shell/android/apk/src/org/chromium/mojo/shell/ShellService.java
|
| +++ b/shell/android/apk/src/org/chromium/mojo/shell/ShellService.java
|
| @@ -154,6 +154,13 @@ public class ShellService extends Service {
|
| }
|
| String viewportId = rootIntent.getStringExtra("ViewportId");
|
| NativeViewportSupportApplicationDelegate.viewportClosed(viewportId);
|
| +
|
| + if (ApplicationStatus.getRunningActivities().size() == 0) {
|
| + // There are only background apps in the shell, so we close ourselves so we can cleanly
|
| + // restart. We may want to investigate how to keep backround apps and restart UI
|
| + // activities cleanly.
|
| + nativeQuitShell();
|
| + }
|
| }
|
|
|
| /**
|
| @@ -321,4 +328,6 @@ public class ShellService extends Service {
|
| private static native void nativeStartApplicationURL(String url);
|
|
|
| private static native void nativeBindShell(int shellHandle);
|
| +
|
| + private static native void nativeQuitShell();
|
| }
|
|
|