Merge "Import translations. DO NOT MERGE" into nyc-mr1-dev
diff --git a/res/drawable/selectable_card.xml b/res/drawable/selectable_card.xml
deleted file mode 100644
index 554b9f6..0000000
--- a/res/drawable/selectable_card.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ Copyright (C) 2015 The Android Open Source Project
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License
-  -->
-
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
-    android:color="?android:attr/colorControlHighlight" >
-    <item android:drawable="@color/card_background"/>
-</ripple>
diff --git a/res/layout/dashboard_tile.xml b/res/layout/dashboard_tile.xml
index 7a0cfbb..1ec1730 100644
--- a/res/layout/dashboard_tile.xml
+++ b/res/layout/dashboard_tile.xml
@@ -19,11 +19,11 @@
     android:id="@+id/dashboard_tile"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
+    android:background="?android:attr/selectableItemBackground"
     android:gravity="center_vertical"
     android:minHeight="@dimen/dashboard_tile_minimum_height"
     android:clickable="true"
-    android:focusable="true"
-    android:background="@drawable/selectable_card">
+    android:focusable="true">
 
     <ImageView
         android:id="@android:id/icon"
diff --git a/res/layout/see_all.xml b/res/layout/see_all.xml
index 56405bb..44b263c 100644
--- a/res/layout/see_all.xml
+++ b/res/layout/see_all.xml
@@ -18,11 +18,11 @@
         xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:background="?android:attr/selectableItemBackground"
         android:gravity="center_vertical"
         android:minHeight="@dimen/dashboard_tile_minimum_height"
         android:clickable="true"
-        android:focusable="true"
-        android:background="@drawable/selectable_card">
+        android:focusable="true">
 
     <View
             android:layout_width="@dimen/dashboard_tile_image_size"
diff --git a/res/values/colors.xml b/res/values/colors.xml
index fc9eaea..4a8cf99 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -71,7 +71,7 @@
     <color name="running_processes_system_ram">#ff384248</color>
     <color name="running_processes_free_ram">#ffced7db</color>
 
-    <color name="card_background">#ffffffff</color>
+    <color name="card_background">#fffafafa</color>
 
     <color name="wifi_divider">#ffe0e0e0</color>
     <color name="sim_noitification">@*android:color/material_deep_teal_500</color>
diff --git a/src/com/android/settings/WifiCallingSettings.java b/src/com/android/settings/WifiCallingSettings.java
index d1464d3..7484b84 100644
--- a/src/com/android/settings/WifiCallingSettings.java
+++ b/src/com/android/settings/WifiCallingSettings.java
@@ -96,12 +96,24 @@
 
             Preference pref = getPreferenceScreen().findPreference(BUTTON_WFC_MODE);
             if (pref != null) {
-                pref.setEnabled(isWfcEnabled
+                pref.setEnabled(isWfcEnabled && getEditableWfcMode(activity)
                         && (state == TelephonyManager.CALL_STATE_IDLE));
             }
         }
     };
 
+    private static boolean getEditableWfcMode(Context context) {
+        CarrierConfigManager configManager = (CarrierConfigManager)
+                context.getSystemService(Context.CARRIER_CONFIG_SERVICE);
+        if (configManager != null) {
+            PersistableBundle b = configManager.getConfig();
+            if (b != null) {
+                return b.getBoolean(CarrierConfigManager.KEY_EDITABLE_WFC_MODE_BOOL);
+            }
+        }
+        return true;
+    }
+
     private final OnPreferenceClickListener mUpdateAddressListener =
             new OnPreferenceClickListener() {
                 /*
@@ -346,7 +358,7 @@
 
     private void updateButtonWfcMode(Context context, boolean wfcEnabled, int wfcMode) {
         mButtonWfcMode.setSummary(getWfcModeSummary(context, wfcMode));
-        mButtonWfcMode.setEnabled(wfcEnabled);
+        mButtonWfcMode.setEnabled(wfcEnabled && mEditableWfcMode);
 
         final PreferenceScreen preferenceScreen = getPreferenceScreen();
         boolean updateAddressEnabled = (getCarrierActivityIntent(context) != null);
@@ -361,7 +373,6 @@
             preferenceScreen.removePreference(mButtonWfcMode);
             preferenceScreen.removePreference(mUpdateAddress);
         }
-        preferenceScreen.setEnabled(mEditableWfcMode);
     }
 
     @Override
diff --git a/src/com/android/settings/deletionhelper/AutomaticStorageManagerSettings.java b/src/com/android/settings/deletionhelper/AutomaticStorageManagerSettings.java
index 4946016..318dea6 100644
--- a/src/com/android/settings/deletionhelper/AutomaticStorageManagerSettings.java
+++ b/src/com/android/settings/deletionhelper/AutomaticStorageManagerSettings.java
@@ -21,6 +21,7 @@
 import android.content.Intent;
 import android.content.res.Resources;
 import android.os.Bundle;
+import android.os.storage.StorageManager;
 import android.provider.Settings;
 import android.util.Log;
 import android.view.View;
@@ -116,7 +117,7 @@
     @Override
     public boolean onPreferenceClick(Preference preference) {
         if (KEY_DELETION_HELPER.equals(preference.getKey())) {
-            Intent intent = new Intent(Settings.ACTION_DELETION_HELPER_SETTINGS);
+            Intent intent = new Intent(StorageManager.ACTION_MANAGE_STORAGE);
             getContext().startActivity(intent);
         }
         return true;
diff --git a/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java b/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java
index 0698666..2a84a93 100644
--- a/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java
+++ b/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java
@@ -445,7 +445,7 @@
                 return true;
             case R.id.storage_free:
                 final Intent deletion_helper_intent =
-                        new Intent(Settings.ACTION_DELETION_HELPER_SETTINGS);
+                        new Intent(StorageManager.ACTION_MANAGE_STORAGE);
                 startActivity(deletion_helper_intent);
                 return true;
         }
diff --git a/src/com/android/settings/gestures/GesturePreference.java b/src/com/android/settings/gestures/GesturePreference.java
index ca2bb8b..76ceba4 100644
--- a/src/com/android/settings/gestures/GesturePreference.java
+++ b/src/com/android/settings/gestures/GesturePreference.java
@@ -100,22 +100,18 @@
         imageView.setVisibility(View.VISIBLE);
         playButton.setVisibility(View.VISIBLE);
 
-        video.setOnTouchListener(new View.OnTouchListener() {
+        video.setOnClickListener(new View.OnClickListener() {
             @Override
-            public boolean onTouch(View v, MotionEvent event) {
-                if (event.getAction() == MotionEvent.ACTION_DOWN) {
-                    if (mMediaPlayer != null) {
-                        if (mMediaPlayer.isPlaying()) {
-                            mMediaPlayer.pause();
-                            playButton.setVisibility(View.VISIBLE);
-                        } else {
-                            mMediaPlayer.start();
-                            playButton.setVisibility(View.GONE);
-                        }
+            public void onClick(View v) {
+                if (mMediaPlayer != null) {
+                    if (mMediaPlayer.isPlaying()) {
+                        mMediaPlayer.pause();
+                        playButton.setVisibility(View.VISIBLE);
+                    } else {
+                        mMediaPlayer.start();
+                        playButton.setVisibility(View.GONE);
                     }
-                    return true;
                 }
-                return false;
             }
         });
 
diff --git a/src/com/android/settings/print/PrintJobSettingsFragment.java b/src/com/android/settings/print/PrintJobSettingsFragment.java
index 08bbd97..dc7df52 100644
--- a/src/com/android/settings/print/PrintJobSettingsFragment.java
+++ b/src/com/android/settings/print/PrintJobSettingsFragment.java
@@ -26,11 +26,13 @@
 import android.support.v7.preference.Preference;
 import android.text.TextUtils;
 import android.text.format.DateUtils;
+import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.view.View;
 
+import android.view.ViewGroup;
 import com.android.internal.logging.MetricsProto.MetricsEvent;
 import com.android.settings.R;
 import com.android.settings.SettingsPreferenceFragment;
@@ -70,8 +72,9 @@
     }
 
     @Override
-    public void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+            Bundle savedInstanceState) {
+        View view = super.onCreateView(inflater, container, savedInstanceState);
 
         addPreferencesFromResource(R.xml.print_job_settings);
         mPrintJobPreference = findPreference(PRINT_JOB_PREFERENCE);
@@ -86,6 +89,8 @@
         processArguments();
 
         setHasOptionsMenu(true);
+
+        return  view;
     }
 
     @Override
diff --git a/src/com/android/settings/print/PrintServiceSettingsFragment.java b/src/com/android/settings/print/PrintServiceSettingsFragment.java
index 42d8a8d..6ef900b 100644
--- a/src/com/android/settings/print/PrintServiceSettingsFragment.java
+++ b/src/com/android/settings/print/PrintServiceSettingsFragment.java
@@ -39,6 +39,7 @@
 import android.text.TextUtils;
 import android.util.Log;
 import android.util.TypedValue;
+import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
@@ -132,8 +133,9 @@
     }
 
     @Override
-    public void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+            Bundle savedInstanceState) {
+        View root = super.onCreateView(inflater, container, savedInstanceState);
 
         mServiceEnabled = getArguments().getBoolean(PrintSettingsFragment.EXTRA_CHECKED);
 
@@ -141,6 +143,8 @@
         if (!TextUtils.isEmpty(title)) {
             getActivity().setTitle(title);
         }
+
+        return root;
     }
 
     @Override
diff --git a/src/com/android/settings/print/PrintSettingsFragment.java b/src/com/android/settings/print/PrintSettingsFragment.java
index 82a18ee..49d254c 100644
--- a/src/com/android/settings/print/PrintSettingsFragment.java
+++ b/src/com/android/settings/print/PrintSettingsFragment.java
@@ -43,6 +43,7 @@
 import android.text.TextUtils;
 import android.text.format.DateUtils;
 import android.util.Log;
+import android.view.LayoutInflater;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.view.ViewGroup;
@@ -104,8 +105,9 @@
     }
 
     @Override
-    public void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+            Bundle savedInstanceState) {
+        View root = super.onCreateView(inflater, container, savedInstanceState);
         addPreferencesFromResource(R.xml.print_settings);
 
         mActivePrintJobsCategory = (PreferenceCategory) findPreference(
@@ -119,6 +121,8 @@
 
         mPrintServicesController = new PrintServicesController();
         getLoaderManager().initLoader(LOADER_ID_PRINT_SERVICES, null, mPrintServicesController);
+
+        return root;
     }
 
     @Override