本文整理汇总了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;
}
}