Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(620)

Unified Diff: sky/services/intents/src/org/domokit/intents/ActivityManagerImpl.java

Issue 1221123003: SkyDemo should use explicit intents (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/services/intents/intents.mojom ('k') | sky/shell/android/org/domokit/sky/shell/SkyActivity.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/services/intents/src/org/domokit/intents/ActivityManagerImpl.java
diff --git a/sky/services/intents/src/org/domokit/intents/ActivityManagerImpl.java b/sky/services/intents/src/org/domokit/intents/ActivityManagerImpl.java
index ad9871ea225ebb6580dc0893304fad1434162499..51ca4ca2971dcc50fabe77287d2485a29c742ecb 100644
--- a/sky/services/intents/src/org/domokit/intents/ActivityManagerImpl.java
+++ b/sky/services/intents/src/org/domokit/intents/ActivityManagerImpl.java
@@ -11,6 +11,7 @@ import android.util.Log;
import org.chromium.mojo.system.MojoException;
import org.chromium.mojom.intents.ActivityManager;
+import org.chromium.mojom.intents.ComponentName;
import org.chromium.mojom.intents.Intent;
/**
@@ -34,6 +35,14 @@ public class ActivityManagerImpl implements ActivityManager {
public void startActivity(Intent intent) {
final android.content.Intent androidIntent = new android.content.Intent(
intent.action, Uri.parse(intent.url));
+
+ if (intent.component != null) {
+ ComponentName component = intent.component;
+ android.content.ComponentName androidComponent =
+ new android.content.ComponentName(component.packageName, component.className);
+ androidIntent.setComponent(androidComponent);
+ }
+
androidIntent.addFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
try {
« no previous file with comments | « sky/services/intents/intents.mojom ('k') | sky/shell/android/org/domokit/sky/shell/SkyActivity.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698