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

Commit 3a24ff34 authored by Siyamed Sinir's avatar Siyamed Sinir
Browse files

Prevent access for Typeface.setDefault

Developers can use font in xml and also application global theme in
order to change the default Typeface. android:textViewStyle and its 
attribute android:textAppearance can be used to change typeface and 
other text related properties.

Test: None
Bug: 123769410
Change-Id: I5923da9c7a31a5da0466fd864dd37100d896e2b0
parent 55d9a604
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -163,7 +163,12 @@ public class Typeface {
    private int[] mSupportedAxes;
    private static final int[] EMPTY_AXES = {};

    @UnsupportedAppUsage
    /**
     * Please use font in xml and also your application global theme to change the default Typeface.
     * android:textViewStyle and its attribute android:textAppearance can be used in order to change
     * typeface and other text related properties.
     */
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
    private static void setDefault(Typeface t) {
        sDefaultTypeface = t;
        nativeSetDefault(t.native_instance);