Java Code Examples for android.provider.Settings.Global#getUriFor()

The following examples show how to use android.provider.Settings.Global#getUriFor() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AudioCapabilities.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
/**
 * Returns the global settings {@link Uri} used by the device to specify external surround sound,
 * or null if the device does not support this functionality.
 */
@Nullable
/* package */ static Uri getExternalSurroundSoundGlobalSettingUri() {
  return deviceMaySetExternalSurroundSoundGlobalSetting()
      ? Global.getUriFor(EXTERNAL_SURROUND_SOUND_KEY)
      : null;
}
 
Example 2
Source File: NetworkScoreService.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
private void registerRecommendationSettingsObserver() {
    final Uri packageNameUri = Global.getUriFor(Global.NETWORK_RECOMMENDATIONS_PACKAGE);
    mRecommendationSettingsObserver.observe(packageNameUri,
            ServiceHandler.MSG_RECOMMENDATIONS_PACKAGE_CHANGED);

    final Uri settingUri = Global.getUriFor(Global.NETWORK_RECOMMENDATIONS_ENABLED);
    mRecommendationSettingsObserver.observe(settingUri,
            ServiceHandler.MSG_RECOMMENDATION_ENABLED_SETTING_CHANGED);
}
 
Example 3
Source File: AudioCapabilities.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the global settings {@link Uri} used by the device to specify external surround sound,
 * or null if the device does not support this functionality.
 */
@Nullable
/* package */ static Uri getExternalSurroundSoundGlobalSettingUri() {
  return deviceMaySetExternalSurroundSoundGlobalSetting()
      ? Global.getUriFor(EXTERNAL_SURROUND_SOUND_KEY)
      : null;
}
 
Example 4
Source File: AudioCapabilities.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the global settings {@link Uri} used by the device to specify external surround sound,
 * or null if the device does not support this functionality.
 */
@Nullable
/* package */ static Uri getExternalSurroundSoundGlobalSettingUri() {
  return deviceMaySetExternalSurroundSoundGlobalSetting()
      ? Global.getUriFor(EXTERNAL_SURROUND_SOUND_KEY)
      : null;
}