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

Commit 32365b91 authored by Jake Wharton's avatar Jake Wharton
Browse files

Expose Resources.getFloat publicly

This saves users from having to create a TypedValue, calling getValue, and then pulling out the float manually.

Test: none, just exposing existing functionality
Bug: 37116599
Change-Id: Ie4fcf51d64ec6113148e1fbf3c199cfff028f579
parent d4bd94d6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -11928,6 +11928,7 @@ package android.content.res {
    method public android.graphics.drawable.Drawable getDrawable(int, android.content.res.Resources.Theme) throws android.content.res.Resources.NotFoundException;
    method public deprecated android.graphics.drawable.Drawable getDrawableForDensity(int, int) throws android.content.res.Resources.NotFoundException;
    method public android.graphics.drawable.Drawable getDrawableForDensity(int, int, android.content.res.Resources.Theme);
    method public float getFloat(int);
    method public android.graphics.Typeface getFont(int) throws android.content.res.Resources.NotFoundException;
    method public float getFraction(int, int, int);
    method public int getIdentifier(java.lang.String, java.lang.String, java.lang.String);
+1 −3
Original line number Diff line number Diff line
@@ -1129,10 +1129,8 @@ public class Resources {
     *
     * @throws NotFoundException Throws NotFoundException if the given ID does
     *         not exist or is not a floating-point value.
     * @hide Pending API council approval.
     */
    @UnsupportedAppUsage
    public float getFloat(int id) {
    public float getFloat(@DimenRes int id) {
        final TypedValue value = obtainTempTypedValue();
        try {
            mResourcesImpl.getValue(id, value, true);