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

Commit 707a59dc authored by Erin Dahlgren's avatar Erin Dahlgren
Browse files

Have the package manager write mimetype of preferred activities to xml.

Issue: 11372979
Change-Id: I5ea4e94c978845426e2650946d0bba076d161c19
parent ca8547b4
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) {