am 8869d6f3: Merge "Extend preferred-app preload support for complex resolutions" into klp-dev
* commit '8869d6f3537b323d1c9d1339d057a4866520e649': Extend preferred-app preload support for complex resolutions
This commit is contained in:
@@ -1959,10 +1959,14 @@ final class Settings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean doNonData = true;
|
boolean doNonData = true;
|
||||||
|
boolean hasSchemes = false;
|
||||||
|
|
||||||
for (int ischeme=0; ischeme<tmpPa.countDataSchemes(); ischeme++) {
|
for (int ischeme=0; ischeme<tmpPa.countDataSchemes(); ischeme++) {
|
||||||
boolean doScheme = true;
|
boolean doScheme = true;
|
||||||
String scheme = tmpPa.getDataScheme(ischeme);
|
String scheme = tmpPa.getDataScheme(ischeme);
|
||||||
|
if (scheme != null && !scheme.isEmpty()) {
|
||||||
|
hasSchemes = true;
|
||||||
|
}
|
||||||
for (int issp=0; issp<tmpPa.countDataSchemeSpecificParts(); issp++) {
|
for (int issp=0; issp<tmpPa.countDataSchemeSpecificParts(); issp++) {
|
||||||
Uri.Builder builder = new Uri.Builder();
|
Uri.Builder builder = new Uri.Builder();
|
||||||
builder.scheme(scheme);
|
builder.scheme(scheme);
|
||||||
@@ -2016,11 +2020,25 @@ final class Settings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int idata=0; idata<tmpPa.countDataTypes(); idata++) {
|
for (int idata=0; idata<tmpPa.countDataTypes(); idata++) {
|
||||||
Intent finalIntent = new Intent(intent);
|
|
||||||
String mimeType = tmpPa.getDataType(idata);
|
String mimeType = tmpPa.getDataType(idata);
|
||||||
finalIntent.setType(mimeType);
|
if (hasSchemes) {
|
||||||
applyDefaultPreferredActivityLPw(service, finalIntent, flags, cn,
|
Uri.Builder builder = new Uri.Builder();
|
||||||
null, null, null, null, mimeType, userId);
|
for (int ischeme=0; ischeme<tmpPa.countDataSchemes(); ischeme++) {
|
||||||
|
String scheme = tmpPa.getDataScheme(ischeme);
|
||||||
|
if (scheme != null && !scheme.isEmpty()) {
|
||||||
|
Intent finalIntent = new Intent(intent);
|
||||||
|
builder.scheme(scheme);
|
||||||
|
finalIntent.setDataAndType(builder.build(), mimeType);
|
||||||
|
applyDefaultPreferredActivityLPw(service, finalIntent, flags, cn,
|
||||||
|
scheme, null, null, null, mimeType, userId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Intent finalIntent = new Intent(intent);
|
||||||
|
finalIntent.setType(mimeType);
|
||||||
|
applyDefaultPreferredActivityLPw(service, finalIntent, flags, cn,
|
||||||
|
null, null, null, null, mimeType, userId);
|
||||||
|
}
|
||||||
doNonData = false;
|
doNonData = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user