|
|
|
@ -49,6 +49,7 @@ public class HdmiSettings extends SettingsPreferenceFragment
|
|
|
|
|
private static final String TAG = "HdmiSettings";
|
|
|
|
|
private static final String KEY_PRE_CATE = "Display";
|
|
|
|
|
private static final String KEY_PRE_RESOLUTION = "Resolution";
|
|
|
|
|
private static final String KEY_PRE_COLOR_MODE = "ColorMode";
|
|
|
|
|
private static final String KEY_PRE_SCREEN_SCALE = "ScreenScale";
|
|
|
|
|
private static final String KEY_AUX_CATEGORY = "aux_category";
|
|
|
|
|
private static final String KEY_AUX_SCREEN_VH = "aux_screen_vh";
|
|
|
|
@ -347,6 +348,21 @@ public class HdmiSettings extends SettingsPreferenceFragment
|
|
|
|
|
DisplayInfo displayInfo = new DisplayInfo();
|
|
|
|
|
displayInfo.setDisplayNo(display);
|
|
|
|
|
mDisplayInfoList.put(display, displayInfo);
|
|
|
|
|
|
|
|
|
|
//add color preference for HDMI-A
|
|
|
|
|
if ("HDMIA".equals(typeName)) {
|
|
|
|
|
String curColorMode = DrmDisplaySetting.getColorMode(display);
|
|
|
|
|
String[] colorList = DrmDisplaySetting.getColorModeList(display);
|
|
|
|
|
Log.v(TAG, "Current mode " + curColorMode + " of " + colorList.length);
|
|
|
|
|
ListPreference colorPreference = new ListPreference(mContext);
|
|
|
|
|
colorPreference.setEntries(colorList);
|
|
|
|
|
colorPreference.setEntryValues(colorList);
|
|
|
|
|
colorPreference.setKey(KEY_PRE_COLOR_MODE + display);
|
|
|
|
|
colorPreference.setTitle(mContext.getString(R.string.screen_output_mode));
|
|
|
|
|
colorPreference.setValue(curColorMode);
|
|
|
|
|
colorPreference.setOnPreferenceChangeListener(this);
|
|
|
|
|
category.addPreference(colorPreference);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
sendUpdateStateMsg(ITEM_CONTROL.REFRESH_DISPLAY_STATUS_INFO, 0);
|
|
|
|
|
|
|
|
|
@ -589,6 +605,14 @@ public class HdmiSettings extends SettingsPreferenceFragment
|
|
|
|
|
}
|
|
|
|
|
preference.getParent().setEnabled(false);
|
|
|
|
|
updateResolution(ITEM_CONTROL.CHANGE_RESOLUTION, index);
|
|
|
|
|
} else if (key.startsWith(KEY_PRE_COLOR_MODE)) {
|
|
|
|
|
int display = Integer.parseInt(key.replace(KEY_PRE_COLOR_MODE, ""));
|
|
|
|
|
ListPreference colorPreference = (ListPreference) preference;
|
|
|
|
|
String curColorMode = DrmDisplaySetting.getColorMode(display);
|
|
|
|
|
String newColorMode = (String) obj;
|
|
|
|
|
if (!newColorMode.equals(curColorMode)) {
|
|
|
|
|
DrmDisplaySetting.setColorMode(display, newColorMode);
|
|
|
|
|
}
|
|
|
|
|
} else if (preference == mAuxScreenVH) {
|
|
|
|
|
mEnableDisplayListener = false;
|
|
|
|
|
showWaitingDialog(R.string.dialog_wait_screen_connect);
|
|
|
|
|