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

Commit e91e866e authored by Ayush Sharma's avatar Ayush Sharma Committed by Android (Google) Code Review
Browse files

Merge "Redirect dial/call intents to managed profile"

parents 31d0a293 4d2013a9
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -320,12 +320,26 @@ public class DefaultCrossProfileIntentFiltersUtils {
                MOBILE_NETWORK_SETTINGS);
    }

    /** Call intent with tel scheme */
    private static final DefaultCrossProfileIntentFilter CALL =
            new DefaultCrossProfileIntentFilter.Builder(
                    DefaultCrossProfileIntentFilter.Direction.TO_PROFILE,
                    SKIP_CURRENT_PROFILE,
                    /* letsPersonalDataIntoProfile= */ false)
                    .addAction(Intent.ACTION_CALL)
                    .addCategory(Intent.CATEGORY_DEFAULT)
                    .addDataScheme("tel")
                    .build();

    /**
     * Returns default telephony related intent filters for managed profile.
     */
    public static List<DefaultCrossProfileIntentFilter> getDefaultManagedProfileTelephonyFilters() {
        return Arrays.asList(
                DIAL_DATA,
                DIAL_MIME,
                DIAL_RAW,
                CALL,
                SMS_MMS);
    }