Merge "copy 'visbileToInstantApps' setting" into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e467be5e14
@@ -284,8 +284,8 @@ public class IntentFilter implements Parcelable {
|
||||
|
||||
private int mVerifyState;
|
||||
|
||||
/** Whether or not the intent filter is visible to ephemeral apps. */
|
||||
private boolean mVisibleToEphemeral;
|
||||
/** Whether or not the intent filter is visible to instant apps. */
|
||||
private boolean mVisibleToInstantApp;
|
||||
// These functions are the start of more optimized code for managing
|
||||
// the string sets... not yet implemented.
|
||||
|
||||
@@ -452,6 +452,7 @@ public class IntentFilter implements Parcelable {
|
||||
}
|
||||
mHasPartialTypes = o.mHasPartialTypes;
|
||||
mVerifyState = o.mVerifyState;
|
||||
mVisibleToInstantApp = o.mVisibleToInstantApp;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -654,12 +655,12 @@ public class IntentFilter implements Parcelable {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public void setVisibleToEphemeral(boolean visibleToEmphemeral) {
|
||||
mVisibleToEphemeral = visibleToEmphemeral;
|
||||
public void setVisibleToInstantApp(boolean visibleToInstantApp) {
|
||||
mVisibleToInstantApp = visibleToInstantApp;
|
||||
}
|
||||
/** @hide */
|
||||
public boolean isVisibleToInstantApp() {
|
||||
return mVisibleToEphemeral;
|
||||
return mVisibleToInstantApp;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1858,6 +1859,7 @@ public class IntentFilter implements Parcelable {
|
||||
dest.writeInt(mPriority);
|
||||
dest.writeInt(mHasPartialTypes ? 1 : 0);
|
||||
dest.writeInt(getAutoVerify() ? 1 : 0);
|
||||
dest.writeInt(isVisibleToInstantApp() ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1926,6 +1928,7 @@ public class IntentFilter implements Parcelable {
|
||||
mPriority = source.readInt();
|
||||
mHasPartialTypes = source.readInt() > 0;
|
||||
setAutoVerify(source.readInt() > 0);
|
||||
setVisibleToInstantApp(source.readInt() > 0);
|
||||
}
|
||||
|
||||
private final boolean findMimeType(String type) {
|
||||
|
||||
@@ -4258,7 +4258,7 @@ public class PackageParser {
|
||||
a.intents.add(intent);
|
||||
}
|
||||
// adjust activity flags when we implicitly expose it via a browsable filter
|
||||
intent.setVisibleToEphemeral(visibleToEphemeral || isWebBrowsableIntent(intent));
|
||||
intent.setVisibleToInstantApp(visibleToEphemeral || isWebBrowsableIntent(intent));
|
||||
if (intent.isVisibleToInstantApp()) {
|
||||
a.info.flags |= ActivityInfo.FLAG_VISIBLE_TO_EPHEMERAL;
|
||||
}
|
||||
@@ -4291,7 +4291,7 @@ public class PackageParser {
|
||||
owner.preferredActivityFilters.add(intent);
|
||||
}
|
||||
// adjust activity flags when we implicitly expose it via a browsable filter
|
||||
intent.setVisibleToEphemeral(visibleToEphemeral || isWebBrowsableIntent(intent));
|
||||
intent.setVisibleToInstantApp(visibleToEphemeral || isWebBrowsableIntent(intent));
|
||||
if (intent.isVisibleToInstantApp()) {
|
||||
a.info.flags |= ActivityInfo.FLAG_VISIBLE_TO_EPHEMERAL;
|
||||
}
|
||||
@@ -4307,12 +4307,12 @@ public class PackageParser {
|
||||
owner.visibleToInstantApps = true;
|
||||
// cycle through any filters already seen
|
||||
for (int i = a.intents.size() - 1; i >= 0; --i) {
|
||||
a.intents.get(i).setVisibleToEphemeral(true /*visibleToEmphemeral*/);
|
||||
a.intents.get(i).setVisibleToInstantApp(true /*visibleToInstantApp*/);
|
||||
}
|
||||
if (owner.preferredActivityFilters != null) {
|
||||
for (int i = owner.preferredActivityFilters.size() - 1; i >= 0; --i) {
|
||||
owner.preferredActivityFilters.get(i)
|
||||
.setVisibleToEphemeral(true /*visibleToEmphemeral*/);
|
||||
.setVisibleToInstantApp(true /*visibleToInstantApp*/);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4618,7 +4618,7 @@ public class PackageParser {
|
||||
+ mArchiveSourcePath + " "
|
||||
+ parser.getPositionDescription());
|
||||
} else {
|
||||
intent.setVisibleToEphemeral(
|
||||
intent.setVisibleToInstantApp(
|
||||
visibleToEphemeral || isWebBrowsableIntent(intent));
|
||||
a.intents.add(intent);
|
||||
}
|
||||
@@ -4821,7 +4821,7 @@ public class PackageParser {
|
||||
}
|
||||
outInfo.intents.add(intent);
|
||||
// adjust provider flags when we implicitly expose it via a browsable filter
|
||||
intent.setVisibleToEphemeral(visibleToEphemeral || isWebBrowsableIntent(intent));
|
||||
intent.setVisibleToInstantApp(visibleToEphemeral || isWebBrowsableIntent(intent));
|
||||
if (intent.isVisibleToInstantApp()) {
|
||||
outInfo.info.flags |= ProviderInfo.FLAG_VISIBLE_TO_EPHEMERAL;
|
||||
}
|
||||
@@ -4838,7 +4838,7 @@ public class PackageParser {
|
||||
owner.visibleToInstantApps = true;
|
||||
// cycle through any filters already seen
|
||||
for (int i = outInfo.intents.size() - 1; i >= 0; --i) {
|
||||
outInfo.intents.get(i).setVisibleToEphemeral(true /*visibleToEmphemeral*/);
|
||||
outInfo.intents.get(i).setVisibleToInstantApp(true /*visibleToInstantApp*/);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5126,7 +5126,7 @@ public class PackageParser {
|
||||
return null;
|
||||
}
|
||||
// adjust activity flags when we implicitly expose it via a browsable filter
|
||||
intent.setVisibleToEphemeral(visibleToEphemeral || isWebBrowsableIntent(intent));
|
||||
intent.setVisibleToInstantApp(visibleToEphemeral || isWebBrowsableIntent(intent));
|
||||
if (intent.isVisibleToInstantApp()) {
|
||||
s.info.flags |= ServiceInfo.FLAG_VISIBLE_TO_EPHEMERAL;
|
||||
}
|
||||
@@ -5143,7 +5143,7 @@ public class PackageParser {
|
||||
owner.visibleToInstantApps = true;
|
||||
// cycle through any filters already seen
|
||||
for (int i = s.intents.size() - 1; i >= 0; --i) {
|
||||
s.intents.get(i).setVisibleToEphemeral(true /*visibleToEmphemeral*/);
|
||||
s.intents.get(i).setVisibleToInstantApp(true /*visibleToInstantApp*/);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user