Example usage for android.os SystemProperties get

List of usage examples for android.os SystemProperties get

Introduction

In this page you can find the example usage for android.os SystemProperties get.

Prototype

@NonNull
@SystemApi
@TestApi
public static String get(@NonNull String key, @Nullable String def) 

Source Link

Document

Get the String value for the given key .

Usage

From source file:com.android.settings.SettingsLicenseActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    final String licenseHtmlPath = SystemProperties.get(PROPERTY_LICENSE_PATH, DEFAULT_LICENSE_PATH);
    if (isFilePathValid(licenseHtmlPath)) {
        showSelectedFile(licenseHtmlPath);
    } else {/*from   ww  w.j a  v a2 s  . c o  m*/
        showHtmlFromDefaultXmlFiles();
    }
}

From source file:com.android.tv.settings.about.AboutFragment.java

private String getSystemPropertySummary(String property) {
    return SystemProperties.get(property, getResources().getString(R.string.device_info_default));
}