Better named encryption flags, start triaging.

Create distinct flags for encryption aware, unaware, and both, and
name them like the other MATCH_ flags.

Start adding logic to help triage all system internal callers to
verify that they've done their homework and thought about how to
handle apps while locked.  Call sites in the system should either
ask for explicit matching behavior, or explicitly use the DEFAULT
match flag to indicate that they've been triaged to use the
default state-based matching.

Bug: 26250295
Change-Id: I86214e5c4f71a6dc72f06930800388713aecd107
This commit is contained in:
Jeff Sharkey
2015-12-18 10:57:58 -07:00
parent 5b0e5207e1
commit 2a9e3f8e68
15 changed files with 125 additions and 65 deletions

View File

@@ -155,7 +155,8 @@ public class DefaultDialerManager {
// Get the list of apps registered for the DIAL intent with empty scheme
Intent intent = new Intent(Intent.ACTION_DIAL);
List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0);
List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent,
PackageManager.MATCH_ENCRYPTION_DEFAULT);
List<String> packageNames = new ArrayList<>();
@@ -207,8 +208,8 @@ public class DefaultDialerManager {
}
final List<String> result = new ArrayList<>();
final List<ResolveInfo> resolveInfoList =
context.getPackageManager().queryIntentActivities(intent, 0);
final List<ResolveInfo> resolveInfoList = context.getPackageManager()
.queryIntentActivities(intent, PackageManager.MATCH_ENCRYPTION_DEFAULT);
final int length = resolveInfoList.size();
for (int i = 0; i < length; i++) {
final ActivityInfo info = resolveInfoList.get(i).activityInfo;