Since: API level 34
public static class

KnoxContract.Config.Font

extends Object
java.lang.Object
   ↳ com.samsung.android.knox.ex.KnoxContract.Config.Font

Deprecated in API level 37

Class Overview

This class provides to set device font size


Specific Policy

Summary

Constants
String CONTENT_URI_STRING
String ID
String KEY_SYSTEM_ACTIVE_FONT_SIZE Deprecated in API level 37
String KEY_SYSTEM_FONT_SIZES Deprecated in API level 37
String PARAM_SYSTEM_ACTIVE_FONT_SIZE
Public Constructors
Font()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String CONTENT_URI_STRING

Since: API level 34

Constant Value: "content://com.samsung.android.knox.sdk/config/font"

public static final String ID

Since: API level 34

Constant Value: "font"

public static final String KEY_SYSTEM_ACTIVE_FONT_SIZE

Since: API level 34

Deprecated in API level 37

API to set the font size on the device


    Param

Usage
 Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/config/font");
 ContentValues contentValues = new ContentValues();
 contentValues.put("system-active-font-size", "1.0");
 String selection = "key=?";
 String[] selectionArgs = new String[] {"system-active-font-size"};
 mContext.getContentResolver().update(uri, contentValues, selection, selectionArgs);

 Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/config/font");
 String selection = "key=?";
 String[] selectionArgs = new String[] {"system-active-font-size"};
 Cursor cursor = mContext.getContentResolver().query(uri, null, selection, selectionArgs, null);
 float systemActiveFontSize = -1.f;
 if (cursor != null) {
     cursor.moveToFirst();
     systemActiveFontSize = cursor.getFloat(0);
 }
 
Since
API level 34
Knox 3.7.1
Permission
The use of this feature requires the caller to have the "com.samsung.android.knox.permission.KNOX_NDA_DEVICE_SETTINGS_RT" permission.
Constant Value: "system-active-font-size"

public static final String KEY_SYSTEM_FONT_SIZES

Since: API level 34

Deprecated in API level 37

API to get the supported font sizes on the device.


Usage
 Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/config/font");
 String selection = "key=?";
 String[] selectionArgs = new String[] {"system-font-sizes"};
 Cursor cursor = mContext.getContentResolver().query(uri, null, selection, selectionArgs, null);
 ArrayList<Float> fontSizes = new ArrayList<>();
 if (cursor != null) {
     cursor.moveToFirst();
     do {
         fontSizes.add(cursor.getFloat(0));
     } while (cursor.moveToNext());
 }
 
Since
API level 34
Knox 3.7.1
Permission
The use of this feature requires the caller to have the "com.samsung.android.knox.permission.KNOX_NDA_DEVICE_SETTINGS_RT" permission.
Constant Value: "system-font-sizes"

public static final String PARAM_SYSTEM_ACTIVE_FONT_SIZE

Since: API level 34

Constant Value: "system-active-font-size"

Public Constructors

public Font ()

Since: API level 34