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

Commit 85114dc5 authored by Eugene Susla's avatar Eugene Susla Committed by Android (Google) Code Review
Browse files

Merge "Migrate system dialer config to RoleManager"

parents 863c2068 8758d320
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -2182,6 +2182,13 @@ public class TextUtils {
        return Character.isWhitespace(codePoint) || codePoint == NBSP_CODE_POINT;
        return Character.isWhitespace(codePoint) || codePoint == NBSP_CODE_POINT;
    }
    }


    /** @hide */
    @Nullable
    public static String withoutPrefix(@Nullable String prefix, @Nullable String str) {
        if (prefix == null || str == null) return str;
        return str.startsWith(prefix) ? str.substring(prefix.length()) : str;
    }

    /**
    /**
     * Remove html, remove bad characters, and truncate string.
     * Remove html, remove bad characters, and truncate string.
     *
     *
+13 −0
Original line number Original line Diff line number Diff line
@@ -690,4 +690,17 @@ public class ArrayUtils {
        }
        }
        return result;
        return result;
    }
    }

    /**
     * Returns the first element from the array for which
     * condition {@code predicate} is true, or null if there is no such element
     */
    public static @Nullable <T> T find(@Nullable T[] items,
            @NonNull java.util.function.Predicate<T> predicate) {
        if (isEmpty(items)) return null;
        for (final T item : items) {
            if (predicate.test(item)) return item;
        }
        return null;
    }
}
}
+1 −0
Original line number Original line Diff line number Diff line
@@ -1937,6 +1937,7 @@
         holders, with each item in the format of "ROLE_NAME: PACKAGE_NAME_1, PACKAGE_NAME_2". -->
         holders, with each item in the format of "ROLE_NAME: PACKAGE_NAME_1, PACKAGE_NAME_2". -->
    <string-array name="config_defaultRoleHolders" translatable="false">
    <string-array name="config_defaultRoleHolders" translatable="false">
        <item>android.app.role.SMS: com.android.messaging</item>
        <item>android.app.role.SMS: com.android.messaging</item>
        <item>android.app.role.DIALER: com.android.phone</item>
    </string-array>
    </string-array>


    <!-- Enable/disable default bluetooth profiles:
    <!-- Enable/disable default bluetooth profiles: