Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6bdbae07 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Fix issue #18665625 CTS:android.app.cts.InstrumentationTest#..." into lmp-mr1-dev

parents 295dc004 80b1c560
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1217,8 +1217,10 @@ public class Instrumentation {
    public void callActivityOnNewIntent(Activity activity, ReferrerIntent intent) {
        final String oldReferrer = activity.mReferrer;
        try {
            if (intent != null) {
                activity.mReferrer = intent.mReferrer;
            callActivityOnNewIntent(activity, new Intent(intent));
            }
            callActivityOnNewIntent(activity, intent != null ? new Intent(intent) : null);
        } finally {
            activity.mReferrer = oldReferrer;
        }
+14 −9
Original line number Diff line number Diff line
@@ -4391,7 +4391,7 @@ public class Intent implements Parcelable, Cloneable {
                // scheme
                else if (uri.startsWith("scheme=", i)) {
                    if (inSelector) {
                        intent.mData = Uri.parse(value);
                        intent.mData = Uri.parse(value + ":");
                    } else {
                        scheme = value;
                    }
@@ -4461,7 +4461,8 @@ public class Intent implements Parcelable, Cloneable {
                            String authority = null;
                            intent.mPackage = data.substring(14, end);
                            int newEnd;
                            if (end < data.length() && (newEnd=data.indexOf('/', end+1)) >= 0) {
                            if ((end+1) < data.length()) {
                                if ((newEnd=data.indexOf('/', end+1)) >= 0) {
                                    // Found a scheme, remember it.
                                    scheme = data.substring(end+1, newEnd);
                                    end = newEnd;
@@ -4470,6 +4471,10 @@ public class Intent implements Parcelable, Cloneable {
                                        authority = data.substring(end+1, newEnd);
                                        end = newEnd;
                                    }
                                } else {
                                    // All we have is a scheme.
                                    scheme = data.substring(end+1);
                                }
                            }
                            if (scheme == null) {
                                // If there was no scheme, then this just targets the package.
@@ -7355,7 +7360,7 @@ public class Intent implements Parcelable, Cloneable {

        toUriInner(frag, scheme, defAction, defPackage, flags);
        if (mSelector != null) {
            uri.append("SEL;");
            frag.append("SEL;");
            // Note that for now we are not going to try to handle the
            // data part; not clear how to represent this as a URI, and
            // not much utility in it.