Merge "Fix issue #18665625 CTS:android.app.cts.InstrumentationTest#..." into lmp-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6bdbae07cf
@@ -1217,8 +1217,10 @@ public class Instrumentation {
|
|||||||
public void callActivityOnNewIntent(Activity activity, ReferrerIntent intent) {
|
public void callActivityOnNewIntent(Activity activity, ReferrerIntent intent) {
|
||||||
final String oldReferrer = activity.mReferrer;
|
final String oldReferrer = activity.mReferrer;
|
||||||
try {
|
try {
|
||||||
activity.mReferrer = intent.mReferrer;
|
if (intent != null) {
|
||||||
callActivityOnNewIntent(activity, new Intent(intent));
|
activity.mReferrer = intent.mReferrer;
|
||||||
|
}
|
||||||
|
callActivityOnNewIntent(activity, intent != null ? new Intent(intent) : null);
|
||||||
} finally {
|
} finally {
|
||||||
activity.mReferrer = oldReferrer;
|
activity.mReferrer = oldReferrer;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4391,7 +4391,7 @@ public class Intent implements Parcelable, Cloneable {
|
|||||||
// scheme
|
// scheme
|
||||||
else if (uri.startsWith("scheme=", i)) {
|
else if (uri.startsWith("scheme=", i)) {
|
||||||
if (inSelector) {
|
if (inSelector) {
|
||||||
intent.mData = Uri.parse(value);
|
intent.mData = Uri.parse(value + ":");
|
||||||
} else {
|
} else {
|
||||||
scheme = value;
|
scheme = value;
|
||||||
}
|
}
|
||||||
@@ -4461,14 +4461,19 @@ public class Intent implements Parcelable, Cloneable {
|
|||||||
String authority = null;
|
String authority = null;
|
||||||
intent.mPackage = data.substring(14, end);
|
intent.mPackage = data.substring(14, end);
|
||||||
int newEnd;
|
int newEnd;
|
||||||
if (end < data.length() && (newEnd=data.indexOf('/', end+1)) >= 0) {
|
if ((end+1) < data.length()) {
|
||||||
// Found a scheme, remember it.
|
if ((newEnd=data.indexOf('/', end+1)) >= 0) {
|
||||||
scheme = data.substring(end+1, newEnd);
|
// Found a scheme, remember it.
|
||||||
end = newEnd;
|
scheme = data.substring(end+1, newEnd);
|
||||||
if (end < data.length() && (newEnd=data.indexOf('/', end+1)) >= 0) {
|
|
||||||
// Found a authority, remember it.
|
|
||||||
authority = data.substring(end+1, newEnd);
|
|
||||||
end = newEnd;
|
end = newEnd;
|
||||||
|
if (end < data.length() && (newEnd=data.indexOf('/', end+1)) >= 0) {
|
||||||
|
// Found a authority, remember it.
|
||||||
|
authority = data.substring(end+1, newEnd);
|
||||||
|
end = newEnd;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// All we have is a scheme.
|
||||||
|
scheme = data.substring(end+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (scheme == null) {
|
if (scheme == null) {
|
||||||
@@ -7355,7 +7360,7 @@ public class Intent implements Parcelable, Cloneable {
|
|||||||
|
|
||||||
toUriInner(frag, scheme, defAction, defPackage, flags);
|
toUriInner(frag, scheme, defAction, defPackage, flags);
|
||||||
if (mSelector != null) {
|
if (mSelector != null) {
|
||||||
uri.append("SEL;");
|
frag.append("SEL;");
|
||||||
// Note that for now we are not going to try to handle the
|
// 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
|
// data part; not clear how to represent this as a URI, and
|
||||||
// not much utility in it.
|
// not much utility in it.
|
||||||
|
|||||||
Reference in New Issue
Block a user