* commit '0c607b97f068ca486036a501052572e9207c0926': Fix 'always' preferred app assignment
This commit is contained in:
@@ -3281,7 +3281,7 @@ public class PackageManagerService extends IPackageManager.Stub {
|
|||||||
// If the result set is different from when this
|
// If the result set is different from when this
|
||||||
// was created, we need to clear it and re-ask the
|
// was created, we need to clear it and re-ask the
|
||||||
// user their preference, if we're looking for an "always" type entry.
|
// user their preference, if we're looking for an "always" type entry.
|
||||||
if (always && !pa.mPref.sameSet(query, priority)) {
|
if (always && !pa.mPref.sameSet(query)) {
|
||||||
Slog.i(TAG, "Result set changed, dropping preferred activity for "
|
Slog.i(TAG, "Result set changed, dropping preferred activity for "
|
||||||
+ intent + " type " + resolvedType);
|
+ intent + " type " + resolvedType);
|
||||||
if (DEBUG_PREFERRED) {
|
if (DEBUG_PREFERRED) {
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ public class PreferredComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean sameSet(List<ResolveInfo> query, int priority) {
|
public boolean sameSet(List<ResolveInfo> query) {
|
||||||
if (mSetPackages == null) {
|
if (mSetPackages == null) {
|
||||||
return query == null;
|
return query == null;
|
||||||
}
|
}
|
||||||
@@ -201,10 +201,10 @@ public class PreferredComponent {
|
|||||||
}
|
}
|
||||||
final int NQ = query.size();
|
final int NQ = query.size();
|
||||||
final int NS = mSetPackages.length;
|
final int NS = mSetPackages.length;
|
||||||
|
|
||||||
int numMatch = 0;
|
int numMatch = 0;
|
||||||
for (int i=0; i<NQ; i++) {
|
for (int i=0; i<NQ; i++) {
|
||||||
ResolveInfo ri = query.get(i);
|
ResolveInfo ri = query.get(i);
|
||||||
if (ri.priority != priority) continue;
|
|
||||||
ActivityInfo ai = ri.activityInfo;
|
ActivityInfo ai = ri.activityInfo;
|
||||||
boolean good = false;
|
boolean good = false;
|
||||||
for (int j=0; j<NS; j++) {
|
for (int j=0; j<NS; j++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user