OSDN Git Service

Merge tag 'android-6.0.1_r22' of https://android.googlesource.com/platform/packages...
authorSteve Kondik <steve@cyngn.com>
Fri, 11 Mar 2016 04:35:32 +0000 (20:35 -0800)
committerSteve Kondik <steve@cyngn.com>
Fri, 11 Mar 2016 04:35:32 +0000 (20:35 -0800)
Android 6.0.1 release 22

Change-Id: Ided010bc125199d47ca59d10f0ed5032a26632ff

15 files changed:
1  2 
res/values-el/strings.xml
res/values-nb/strings.xml
res/values-ru/strings.xml
res/values-sw/strings.xml
res/values/config.xml
res/values/dimens.xml
res/values/strings.xml
res/xml/development_prefs.xml
src/com/android/settings/DataUsageSummary.java
src/com/android/settings/DevelopmentSettings.java
src/com/android/settings/Utils.java
src/com/android/settings/WifiCallingSettings.java
src/com/android/settings/WirelessSettings.java
src/com/android/settings/applications/InstalledAppDetails.java
src/com/android/settings/fuelgauge/BatteryEntry.java

Simple merge
Simple merge
Simple merge
Simple merge
      <!-- The duration (in milliseconds) of activity transitions -->
      <integer name="setup_wizard_transition_duration">300</integer>
  
 +    <!-- Config to show/hide Wifi calling mode Preference UI option -->
 +    <bool name="config_wfc_mode_supported" translatable="false">true</bool>
 +
 +    <!-- Config to enable/disable ppp number in APN editor -->
 +    <bool name="config_ppp_enabled">false</bool>
 +
 +    <!-- Config to set default APN type when adding a new APN -->
 +    <string name="config_default_new_apn_type" translateable="false"></string>
 +
 +    <!-- Config to enable duplicate APN checking. When true, disallows adding new duplicate APNs -->
 +    <bool name="config_enable_duplicate_apn_checking">false</bool>
 +
 +    <!-- This used to define screen color's Hue progress bar minimum value -->
 +    <integer name="minimum_hue_value" translatable="false">0</integer>
 +
 +    <!-- This is used to define screen color's Hue progress bar maximum value-->
 +    <integer name="maximum_hue_value" translatable="false">360</integer>
 +
 +    <!-- This is used to define screen color's Hue progress bar default value-->
 +    <integer name="default_hue_value" translatable="false">180</integer>
 +
 +    <!-- This is used to define screen color's saturation progress bar minimum value-->
 +    <integer name="minimum_saturation_value" translatable="false">0</integer>
 +
 +    <!-- This is used to define screen color's saturation progress bar maximum value-->
 +    <integer name="maximum_saturation_value" translatable="false">360</integer>
 +
 +    <!-- This is used to define screen color's saturation progress bar default value-->
 +    <integer name="default_saturation_value" translatable="false">180</integer>
 +
 +    <!-- This is used to define screen color's intensity progress bar minimum value-->
 +    <integer name="minimum_intensity_value" translatable="false">0</integer>
 +
 +    <!-- This is used to define screen color's intensity progress bar maximum value-->
 +    <integer name="maximum_intensity_value" translatable="false">400</integer>
 +
 +    <!-- This is used to define screen color's intensity progress bar default value-->
 +    <integer name="default_intensity_value" translatable="false">200</integer>
 +
 +    <!-- This is used to define screen color's contrast progress bar minimum value-->
 +    <integer name="minimum_contrast_value" translatable="false">0</integer>
 +
 +    <!-- This is used to define screen color's contrast progress bar default value-->
 +    <integer name="default_contrast_value" translatable="false">180</integer>
 +
 +    <!-- This is used to define screen color's contrast progress bar maximum value-->
 +    <integer name="maximum_contrast_value" translatable="false">360</integer>
 +
 +    <!-- Metrics server endpoints -->
 +    <string name="stats_cm_url">https://stats.cyanogenmod.org/submit</string>
 +    <string name="stats_cyanogen_url">https://shopvac.cyngn.com/community/heartbeat</string>
 +    <string name="stats_cyanogen_token_url">https://account.cyngn.com/api/v1/community/heartbeat_token</string>
 +
 +    <!-- Display ro.product.name above Device model -->
 +    <bool name="config_displayDeviceName">false</bool>
 +
 +    <!-- SAR Level for a device -->
 +    <!-- Must be overlaid by device -->
 +    <bool name="config_show_sar_enable" translatable="false">false</bool>
 +    <!-- Maximum Specific Absorption Rate for head -->
 +    <string name="sar_head_level" translatable="false"></string>
 +    <!-- Maximum Specific Absorption Rate for body -->
 +    <string name="sar_body_level" translatable="false"></string>
 +
 +    <!-- IC Code for a device -->
 +    <!-- Must be overlaid by device -->
 +    <bool name="config_show_ic_enable" translatable="false">false</bool>
 +    <!-- IC Code -->
 +    <string name="ic_code" translatable="false"></string>
 +    <string name="ic_model" translatable="false"></string>
 +
 +    <bool name="config_hide_wifi_region_code">false</bool>
 +
 +    <!-- Whether to disable allcaps default state of tabtext within datausage -->
 +    <bool name="config_gcf_disable_default_tabtext_allcaps">false</bool>
++
+     <!-- When true enable color temperature setting. -->
+     <bool name="config_enableColorTemperature">false</bool>
  </resources>
Simple merge
Simple merge
Simple merge
@@@ -278,19 -256,11 +281,21 @@@ public class DevelopmentSettings extend
      private ListPreference mAppProcessLimit;
  
      private SwitchPreference mShowAllANRs;
 +    private SwitchPreference mKillAppLongpressBack;
  
 +    private ListPreference mRootAccess;
 +    private Object mSelectedRootValue;
 +    private PreferenceScreen mDevelopmentTools;
      private ColorModePreference mColorModePreference;
  
 +    private SwitchPreference mAdvancedReboot;
 +
 +    private SwitchPreference mUpdateRecovery;
 +
 +    private SwitchPreference mDevelopmentShortcut;
 +
+     private SwitchPreference mColorTemperaturePreference;
      private final ArrayList<Preference> mAllPrefs = new ArrayList<Preference>();
  
      private final ArrayList<SwitchPreference> mResetSwitchPrefs
          updateMobileDataAlwaysOnOptions();
          updateSimulateColorSpace();
          updateUSBAudioOptions();
 +        updateRootAccessOptions();
 +        updateAdvancedRebootOptions();
 +        updateDevelopmentShortcutOptions();
 +        updateUpdateRecoveryOptions();
+         if (mColorTemperaturePreference != null) {
+             updateColorTemperature();
+         }
      }
  
 +    private void writeAdvancedRebootOptions() {
 +        CMSettings.Secure.putInt(getActivity().getContentResolver(),
 +                CMSettings.Secure.ADVANCED_REBOOT,
 +                mAdvancedReboot.isChecked() ? 1 : 0);
 +    }
 +
 +    private void updateAdvancedRebootOptions() {
 +        mAdvancedReboot.setChecked(CMSettings.Secure.getInt(getActivity().getContentResolver(),
 +                CMSettings.Secure.ADVANCED_REBOOT, 0) != 0);
 +    }
 +
 +    private void resetDevelopmentShortcutOptions() {
 +        CMSettings.Secure.putInt(getActivity().getContentResolver(),
 +                CMSettings.Secure.DEVELOPMENT_SHORTCUT, 0);
 +    }
 +
 +    private void writeDevelopmentShortcutOptions() {
 +        CMSettings.Secure.putInt(getActivity().getContentResolver(),
 +                CMSettings.Secure.DEVELOPMENT_SHORTCUT,
 +                mDevelopmentShortcut.isChecked() ? 1 : 0);
 +    }
 +
 +    private void updateDevelopmentShortcutOptions() {
 +        mDevelopmentShortcut.setChecked(CMSettings.Secure.getInt(getActivity().getContentResolver(),
 +                CMSettings.Secure.DEVELOPMENT_SHORTCUT, 0) != 0);
 +    }
 +
 +    private void updateAdbOverNetwork() {
 +        int port = CMSettings.Secure.getInt(getActivity().getContentResolver(),
 +                CMSettings.Secure.ADB_PORT, 0);
 +        boolean enabled = port > 0;
 +
 +        updateSwitchPreference(mAdbOverNetwork, enabled);
 +
 +        WifiInfo wifiInfo = null;
 +
 +        if (enabled) {
 +            IWifiManager wifiManager = IWifiManager.Stub.asInterface(
 +                    ServiceManager.getService(Context.WIFI_SERVICE));
 +            try {
 +                wifiInfo = wifiManager.getConnectionInfo();
 +            } catch (RemoteException e) {
 +                Log.e(TAG, "wifiManager, getConnectionInfo()", e);
 +            }
 +        }
 +
 +        if (wifiInfo != null) {
 +            String hostAddress = NetworkUtils.intToInetAddress(
 +                    wifiInfo.getIpAddress()).getHostAddress();
 +            mAdbOverNetwork.setSummary(hostAddress + ":" + String.valueOf(port));
 +        } else {
 +            mAdbOverNetwork.setSummary(R.string.adb_over_network_summary);
 +        }
 +    }
 +
      private void resetDangerousOptions() {
          mDontPokeProperties = true;
          for (int i=0; i< mResetSwitchPrefs.size(); i++) {
              writeLegacyDhcpClientOptions();
          } else if (preference == mMobileDataAlwaysOn) {
              writeMobileDataAlwaysOnOptions();
+         } else if (preference == mColorTemperaturePreference) {
+             writeColorTemperature();
          } else if (preference == mUSBAudio) {
              writeUSBAudioOptions();
 +        } else if (preference == mAdvancedReboot) {
 +            writeAdvancedRebootOptions();
          } else if (INACTIVE_APPS_KEY.equals(preference.getKey())) {
              startInactiveAppsFragment();
 +        } else if (preference == mDevelopmentShortcut) {
 +            writeDevelopmentShortcutOptions();
 +        } else if (preference == mKillAppLongpressBack) {
 +            writeKillAppLongpressBackOptions();
 +        } else if (preference == mUpdateRecovery) {
 +            if (mSwitchBar.isChecked()) {
 +                if (mUpdateRecoveryDialog != null) {
 +                    dismissDialogs();
 +                }
 +                if (mUpdateRecovery.isChecked()) {
 +                    mUpdateRecoveryDialog = new AlertDialog.Builder(getActivity()).setMessage(
 +                            getResources().getString(R.string.update_recovery_on_warning))
 +                            .setTitle(R.string.update_recovery_title)
 +                            .setPositiveButton(android.R.string.yes, this)
 +                            .setNegativeButton(android.R.string.no, this)
 +                            .show();
 +                } else {
 +                    mUpdateRecoveryDialog = new AlertDialog.Builder(getActivity()).setMessage(
 +                            getResources().getString(R.string.update_recovery_off_warning))
 +                            .setTitle(R.string.update_recovery_title)
 +                            .setPositiveButton(android.R.string.yes, this)
 +                            .setNegativeButton(android.R.string.no, this)
 +                            .show();
 +                }
 +                mUpdateRecoveryDialog.setOnDismissListener(this);
 +            }
          } else {
              return super.onPreferenceTreeClick(preferenceScreen, preference);
          }
@@@ -95,10 -88,9 +95,10 @@@ import android.widget.TabWidget
  
  import com.android.internal.util.UserIcons;
  import com.android.settings.UserAdapter.UserDetails;
++import com.android.settings.bluetooth.BluetoothSettings;
  import com.android.settings.dashboard.DashboardTile;
- import com.android.settings.drawable.CircleFramedDrawable;
  import com.android.settingslib.applications.ApplicationsState;
- import com.android.settings.bluetooth.BluetoothSettings;
+ import com.android.settingslib.drawable.CircleFramedDrawable;
  
  import java.io.IOException;
  import java.io.InputStream;