本文整理匯總了Java中android.provider.Settings.ACTION_DISPLAY_SETTINGS屬性的典型用法代碼示例。如果您正苦於以下問題:Java Settings.ACTION_DISPLAY_SETTINGS屬性的具體用法?Java Settings.ACTION_DISPLAY_SETTINGS怎麽用?Java Settings.ACTION_DISPLAY_SETTINGS使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類android.provider.Settings
的用法示例。
在下文中一共展示了Settings.ACTION_DISPLAY_SETTINGS屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createSettingHandler
/**
* Factory method
* @param setting a setting for which a handler will be created
* @return a setting handler
*/
public static SettingHandler createSettingHandler(Setting setting) {
switch (setting.id) {
// create handlers
case WIFI: return new WiFiSettingHandler(setting);
case GPS: return new GpsSettingHandler(setting);
case RINGER: return new RingerSettingHandler(setting);
case BRIGHTNESS: {
if (SDK_VERSION == BrightnessSettingHandlerX10.SDK_VERSION && Build.DEVICE.equals(BrightnessSettingHandlerX10.DEVICE)) {
return new BrightnessSettingHandlerX10(setting);
} else {
return new BrightnessSettingHandler(setting);
}
}
case AIRPLANE_MODE: return new AirplaneModeSettingHandler(setting);
case MOBILE_DATA_APN: return new MobileDataSettingHandler(setting);
case BLUETOOTH: return new BluetoothSettingHandler(setting);
case SCREEN_TIMEOUT: return new ScreenTimeoutSettingHandler(setting);
case VOLUME: return new VolumeControlSettingHandler(setting);
case AUTO_SYNC: return new AutoSyncSettingHandler(setting);
case AUTO_ROTATE: return new SystemPropertySettingHandler(setting, Settings.System.ACCELEROMETER_ROTATION, Settings.ACTION_DISPLAY_SETTINGS);
case LOCK_PATTERN: return SDK_VERSION >= 8 ? new UnlockPatternSettingHandler22(setting) : new UnlockPatternSettingHandler(setting);
case MASTER_VOLUME: return new MasterVolumeSettingHandler(setting);
case WIFI_HOTSPOT: return new WifiHotspotSettingHandler(setting);
case MOBILE_DATA: return new MobileDataSettingHandler2(setting);
case FOUR_G : return new FourGEvoSettingHandler(setting);
// null-handlers
case Setting.GROUP_VISIBLE:
case Setting.GROUP_HIDDEN:
default:
return null;
}
}
示例2: onLongClick
@Override
public boolean onLongClick(View v) {
try {
Intent intent = new Intent(Settings.ACTION_DISPLAY_SETTINGS);
Object host = XposedHelpers.getObjectField(mQsPanel, "mHost");
XposedHelpers.callMethod(host, "startActivityDismissingKeyguard", intent);
return true;
} catch (Throwable t) {
XposedBridge.log(t);
return false;
}
}