summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRockchip2015-09-22 16:09:09 +0800
committerRockchip2015-09-22 16:09:09 +0800
commit432a0e3b7cc76070675eb9d7d9d8ff8958e53caf (patch)
treef5854b7294feef7d513fda9fea4b7b175a418c78
parent42bd4a6076257d5c8b4668b2fc8674c0b597cd47 (diff)
modify multiwindow
-rw-r--r--src/com/android/settings/DisplaySettings.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/com/android/settings/DisplaySettings.java b/src/com/android/settings/DisplaySettings.java
index 62eb26d..97ffc96 100644
--- a/src/com/android/settings/DisplaySettings.java
+++ b/src/com/android/settings/DisplaySettings.java
@@ -28,7 +28,7 @@ import static android.provider.Settings.System.SCREEN_BRIGHTNESS_MODE;
import static android.provider.Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC;
import static android.provider.Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL;
import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;
-
+import android.app.IActivityManager;
import android.app.Activity;
import android.app.ActivityManagerNative;
import android.app.Dialog;
@@ -146,7 +146,7 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
addPreferencesFromResource(R.xml.display_settings);
//$_rbox_$_modify_by lly$_begin
isTablet = "tablet".equals(SystemProperties.get("ro.target.product", "tablet"));
- enableMulti = "rk3288".equals(SystemProperties.get("ro.board.platform", "tablet"));
+ enableMulti = "rk3288".equals(SystemProperties.get("ro.board.platform", "unknow")) || "rk3368".equals(SystemProperties.get("ro.board.platform", "unknow"));
//$_rbox_$_modify_by lly$_end
mScreenSaverPreference = findPreference(KEY_SCREEN_SAVER);
@@ -164,7 +164,7 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
disableUnusableTimeouts(mScreenTimeoutPreference);
updateTimeoutPreferenceDescription(currentTimeout);
- mFontSizePref = (WarnedListPreference) findPreference(KEY_FONT_SIZE);
+ mFontSizePref = (WarnedListPreference) findPreference(KEY_FONT_SIZE);
mFontSizePref.setOnPreferenceChangeListener(this);
mFontSizePref.setOnPreferenceClickListener(this);
@@ -247,12 +247,16 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
} else {
removePreference(KEY_AUTO_ROTATE);
}
- if(isTablet&&enableMulti){
+
+ IActivityManager am = ActivityManagerNative.getDefault();
+ try{
+ if(enableMulti && am.getEnableMulWindow()){
mMultiWindowPreference = (SwitchPreference) findPreference(KEY_MULTI_WINDOW);
mMultiWindowPreference.setOnPreferenceChangeListener(this);
}else{
removePreference(KEY_MULTI_WINDOW);
}
+ }catch(RemoteException e){}
//$_rbox_$_modify_$_begin
mMainDisplay = (ListPreference) findPreference(KEY_MAIN_DISPLAY_INTERFACE);
mMainModeList = (ListPreference) findPreference(KEY_MAIN_DISPLAY_MODE);