diff options
author | Clara Bayarri <clarabayarri@google.com> | 2015-03-27 17:32:45 +0000 |
---|---|---|
committer | Clara Bayarri <clarabayarri@google.com> | 2015-04-10 16:28:35 +0100 |
commit | d5bf3ed9b0138e9fd305da91386d1df03f9a75cc (patch) | |
tree | 5f38f58ba996c7f01ff620c55a3e64f10a8fe4ce /core/java/android/app/Instrumentation.java | |
parent | 4c42bc045daccb293198559334df6fc6232fff6a (diff) | |
download | frameworks_base-d5bf3ed9b0138e9fd305da91386d1df03f9a75cc.zip frameworks_base-d5bf3ed9b0138e9fd305da91386d1df03f9a75cc.tar.gz frameworks_base-d5bf3ed9b0138e9fd305da91386d1df03f9a75cc.tar.bz2 |
Show and trigger activities that implement Text Processing actions
This CL adds the Activities that support Intent.ACTION_PROCESS_TEXT
to the Text Selection Action Mode in Editor, and triggers an intent
with the currently selected text when they are selected.
It also adds the required mechanism to allow a View to request an
intent to be started, and return the activity result back to it.
Change-Id: I62ec618010edf01da41338c8c1a7dd4292a15227
Diffstat (limited to 'core/java/android/app/Instrumentation.java')
-rw-r--r-- | core/java/android/app/Instrumentation.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java index 5572d30..fc96464 100644 --- a/core/java/android/app/Instrumentation.java +++ b/core/java/android/app/Instrumentation.java @@ -1568,7 +1568,7 @@ public class Instrumentation { /** * Like {@link #execStartActivity(android.content.Context, android.os.IBinder, - * android.os.IBinder, Fragment, android.content.Intent, int, android.os.Bundle)}, + * android.os.IBinder, String, android.content.Intent, int, android.os.Bundle)}, * but for calls from a {#link Fragment}. * * @param who The Context from which the activity is being started. @@ -1576,7 +1576,7 @@ public class Instrumentation { * is being started. * @param token Internal token identifying to the system who is starting * the activity; may be null. - * @param target Which fragment is performing the start (and thus receiving + * @param target Which element is performing the start (and thus receiving * any result). * @param intent The actual Intent to start. * @param requestCode Identifier for this request's result; less than zero @@ -1595,7 +1595,7 @@ public class Instrumentation { * {@hide} */ public ActivityResult execStartActivity( - Context who, IBinder contextThread, IBinder token, Fragment target, + Context who, IBinder contextThread, IBinder token, String target, Intent intent, int requestCode, Bundle options) { IApplicationThread whoThread = (IApplicationThread) contextThread; if (mActivityMonitors != null) { @@ -1619,8 +1619,7 @@ public class Instrumentation { int result = ActivityManagerNative.getDefault() .startActivity(whoThread, who.getBasePackageName(), intent, intent.resolveTypeIfNeeded(who.getContentResolver()), - token, target != null ? target.mWho : null, - requestCode, 0, null, options); + token, target, requestCode, 0, null, options); checkStartActivityResult(result, intent); } catch (RemoteException e) { } |