Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9705893 authored by Erin Dahlgren's avatar Erin Dahlgren Committed by Android Git Automerger
Browse files

am 204b1e28: am fe470c37: Merge "Have the package manager write mimetype of...

am 204b1e28: am fe470c37: Merge "Have the package manager write mimetype of preferred activities to xml." into klp-dev

* commit '204b1e28':
  Have the package manager write mimetype of preferred activities to xml.
parents a5d24638 204b1e28
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -2070,9 +2070,11 @@ final class Settings {
                if (intent.getAction() != null) {
                    filter.addAction(intent.getAction());
                }
                if (intent.getCategories() != null) {
                    for (String cat : intent.getCategories()) {
                        filter.addCategory(cat);
                    }
                }
                if ((flags&PackageManager.MATCH_DEFAULT_ONLY) != 0) {
                    filter.addCategory(Intent.CATEGORY_DEFAULT);
                }
@@ -2088,6 +2090,13 @@ final class Settings {
                if (path != null) {
                    filter.addDataPath(path);
                }
                if (intent.getType() != null) {
                    try {
                        filter.addDataType(intent.getType());
                    } catch (IntentFilter.MalformedMimeTypeException ex) {
                        Slog.w(TAG, "Malformed mimetype " + intent.getType() + " for " + cn);
                    }
                }
                PreferredActivity pa = new PreferredActivity(filter, match, set, cn, true);
                editPreferredActivitiesLPw(userId).addFilter(pa);
            } else if (!haveNonSys) {