diff --git a/res/layout/gesture_preference.xml b/res/layout/gesture_preference.xml
index 2ad625c..2f593fe 100644
--- a/res/layout/gesture_preference.xml
+++ b/res/layout/gesture_preference.xml
@@ -57,7 +57,7 @@
         android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
         android:orientation="horizontal">
 
-        <FrameLayout
+        <com.android.settings.widget.AspectRatioFrameLayout
             android:id="@+id/gesture_animation_frame"
             android:layout_width="0dp"
             android:layout_height="match_parent"
@@ -74,7 +74,7 @@
                 android:id="@+id/gesture_image"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:visibility="gone"/>
+                android:background="@color/gestures_setting_background_color"/>
 
             <ImageView
                 android:id="@+id/gesture_play_button"
@@ -82,10 +82,9 @@
                 android:layout_height="@dimen/gestures_play_button_size"
                 android:src="@drawable/ic_gesture_play_button"
                 android:gravity="center"
-                android:layout_gravity="center"
-                android:visibility="gone"/>
+                android:layout_gravity="center"/>
 
-        </FrameLayout>
+        </com.android.settings.widget.AspectRatioFrameLayout>
 
         <TextView
             android:id="@android:id/summary"
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 8fb61dd..218d7f2 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -141,4 +141,9 @@
         <attr name="animation" format="reference" />
     </declare-styleable>
 
+    <!-- For AspectRatioFrameLayout -->
+    <declare-styleable name="AspectRatioFrameLayout">
+        <attr name="aspectRatio" format="float" />
+    </declare-styleable>
+
 </resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 5073893..369210f 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -7516,7 +7516,10 @@
     <string name="support_escalation_24_7_summary">Our support team is available all day, every day</string>
 
     <!-- Summary text when customer support is closed. [CHAR LIMIT=NONE]-->
-    <string name="support_escalation_closed_summary">Phone support hours (local time)&lt;br&gt;&lt;b&gt;<xliff:g id="operation_hours">%s</xliff:g>&lt;/b&gt;</string>
+    <string name="support_escalation_closed_summary">Search help or come back during support hours (local time):&lt;br&gt;&lt;b&gt;<xliff:g id="operation_hours">%s</xliff:g>&lt;/b&gt;</string>
+
+    <!-- Summary text to call customer support when there is no internet. [CHAR LIMIT=NONE]-->
+    <string name="support_escalation_no_internet_summary">Phone support hours (local time)&lt;br&gt;&lt;b&gt;<xliff:g id="operation_hours">%s</xliff:g>&lt;/b&gt;</string>
 
     <!-- Summary text when customer support is unavailable in the region. [CHAR LIMIT=NONE]-->
     <string name="support_escalation_unavailable_summary">Search help or explore tips &amp; tricks</string>
@@ -7538,7 +7541,7 @@
     </string>
 
     <!-- Title text for a list of international support phone numbers. [CHAR LIMIT=60]-->
-    <string name="support_international_phone_title">Traveling aboard?</string>
+    <string name="support_international_phone_title">Traveling abroad?</string>
 
     <!-- Description text warning international phone charge may apply when dialing support numbers. [CHAR LIMIT=NONE]-->
     <string name="support_international_phone_summary">International charges may apply</string>
diff --git a/res/xml/display_settings.xml b/res/xml/display_settings.xml
index cb1fac5..b540c8f 100644
--- a/res/xml/display_settings.xml
+++ b/res/xml/display_settings.xml
@@ -77,7 +77,7 @@
                 android:title="@string/doze_title"
                 android:summary="@string/doze_summary"
                 android:fragment="com.android.settings.gestures.GestureSettings" >
-                <extra android:name=":settings:fragment_args_key"
+                <extra android:name="gesture_scroll_to_preference"
                        android:value="gesture_pick_up_and_nudge" />
         </PreferenceScreen>
 
diff --git a/src/com/android/settings/DeviceInfoSettings.java b/src/com/android/settings/DeviceInfoSettings.java
index dd8064f..7befbc2 100644
--- a/src/com/android/settings/DeviceInfoSettings.java
+++ b/src/com/android/settings/DeviceInfoSettings.java
@@ -32,6 +32,8 @@
 import android.support.v7.preference.Preference;
 import android.support.v7.preference.PreferenceGroup;
 import android.telephony.CarrierConfigManager;
+import android.telephony.SubscriptionInfo;
+import android.telephony.SubscriptionManager;
 import android.text.TextUtils;
 import android.util.Log;
 import android.widget.Toast;
@@ -377,17 +379,39 @@
 
         private final Context mContext;
         private final SummaryLoader mSummaryLoader;
+        private final SubscriptionManager mSubscriptionManager;
+        private final SubscriptionChangeListener mSubscriptionChangeListener;
 
         public SummaryProvider(Context context, SummaryLoader summaryLoader) {
             mContext = context;
             mSummaryLoader = summaryLoader;
+            mSubscriptionManager = SubscriptionManager.from(mContext);
+            mSubscriptionChangeListener = new SubscriptionChangeListener();
         }
 
         @Override
         public void setListening(boolean listening) {
             if (listening) {
-                mSummaryLoader.setSummary(this, mContext.getString(R.string.about_summary,
-                        Build.VERSION.RELEASE));
+                updateSummary();
+                mSubscriptionManager.addOnSubscriptionsChangedListener(mSubscriptionChangeListener);
+            } else {
+                mSubscriptionManager.removeOnSubscriptionsChangedListener(
+                        mSubscriptionChangeListener);
+            }
+        }
+
+        private void updateSummary() {
+            final String formattedPhoneNumbers = DeviceInfoUtils.getFormattedPhoneNumbers(
+                    mContext, mSubscriptionManager.getActiveSubscriptionInfoList());
+            mSummaryLoader.setSummary(SummaryProvider.this, formattedPhoneNumbers);
+        }
+
+        private final class SubscriptionChangeListener
+                extends SubscriptionManager.OnSubscriptionsChangedListener {
+
+            @Override
+            public void onSubscriptionsChanged() {
+                updateSummary();
             }
         }
     }
diff --git a/src/com/android/settings/dashboard/SupportItemAdapter.java b/src/com/android/settings/dashboard/SupportItemAdapter.java
index 9493f89..4e9153c 100644
--- a/src/com/android/settings/dashboard/SupportItemAdapter.java
+++ b/src/com/android/settings/dashboard/SupportItemAdapter.java
@@ -198,10 +198,11 @@
             builder.setTileTitle(R.string.support_escalation_title)
                     .setTileSummary(R.string.support_escalation_summary);
         } else {
-            // Support is not temporarily unavailable.
+            // Support is now temporarily unavailable.
             builder.setTileTitle(R.string.support_escalation_title)
                     .setTileSummary(
-                            mSupportFeatureProvider.getOperationHours(mActivity, PHONE, null));
+                            mSupportFeatureProvider.getOperationHours(mActivity, PHONE, null,
+                                    true /* hasInternet */));
         }
         if (hasPhoneOperation) {
             builder.setText1(R.string.support_escalation_by_phone)
@@ -222,7 +223,7 @@
             operatingHours = mActivity.getString(R.string.support_escalation_24_7_summary);
         } else {
             operatingHours = mSupportFeatureProvider.getOperationHours(mActivity,
-                    PHONE, mSelectedCountry);
+                    PHONE, mSelectedCountry, false /* hasInternet */);
         }
         mSupportData.add(new OfflineEscalationData.Builder(mActivity)
                 .setCountries(mSupportFeatureProvider.getPhoneSupportCountries())
diff --git a/src/com/android/settings/deviceinfo/SimStatus.java b/src/com/android/settings/deviceinfo/SimStatus.java
index ba14e13..4569131 100644
--- a/src/com/android/settings/deviceinfo/SimStatus.java
+++ b/src/com/android/settings/deviceinfo/SimStatus.java
@@ -16,9 +16,6 @@
 
 package com.android.settings.deviceinfo;
 
-import static android.content.Context.CARRIER_CONFIG_SERVICE;
-import static android.content.Context.TELEPHONY_SERVICE;
-
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
@@ -32,7 +29,6 @@
 import android.support.v7.preference.Preference;
 import android.telephony.CarrierConfigManager;
 import android.telephony.CellBroadcastMessage;
-import android.telephony.PhoneNumberUtils;
 import android.telephony.PhoneStateListener;
 import android.telephony.ServiceState;
 import android.telephony.SignalStrength;
@@ -58,9 +54,13 @@
 import com.android.settings.R;
 import com.android.settings.SettingsPreferenceFragment;
 import com.android.settings.Utils;
+import com.android.settingslib.DeviceInfoUtils;
 
 import java.util.List;
 
+import static android.content.Context.CARRIER_CONFIG_SERVICE;
+import static android.content.Context.TELEPHONY_SERVICE;
+
 
 /**
  * Display the following information
@@ -393,13 +393,10 @@
         mShowICCID = carrierConfig.getBoolean(
                 CarrierConfigManager.KEY_SHOW_ICCID_IN_SIM_STATUS_BOOL);
 
-        String rawNumber = mTelephonyManager.getLine1Number(mSir.getSubscriptionId());
-        String formattedNumber = null;
-        if (!TextUtils.isEmpty(rawNumber)) {
-            formattedNumber = PhoneNumberUtils.formatNumber(rawNumber);
-        }
+
         // If formattedNumber is null or empty, it'll display as "Unknown".
-        setSummaryText(KEY_PHONE_NUMBER, formattedNumber);
+        setSummaryText(KEY_PHONE_NUMBER,
+                DeviceInfoUtils.getFormattedPhoneNumber(getContext(), mSir));
         setSummaryText(KEY_IMEI, mPhone.getImei());
         setSummaryText(KEY_IMEI_SV, mPhone.getDeviceSvn());
 
diff --git a/src/com/android/settings/gestures/GesturePreference.java b/src/com/android/settings/gestures/GesturePreference.java
index 76ceba4..cad7297 100644
--- a/src/com/android/settings/gestures/GesturePreference.java
+++ b/src/com/android/settings/gestures/GesturePreference.java
@@ -50,7 +50,8 @@
     private Uri mVideoPath;
     private MediaPlayer mMediaPlayer;
     private MediaMetadataRetriever mMediaMetadata;
-    private boolean animationAvailable;
+    private boolean mAnimationAvailable;
+    private boolean mPreviewReady;
 
     public GesturePreference(Context context, AttributeSet attrs) {
         super(context, attrs);
@@ -68,7 +69,7 @@
                     .build();
             mMediaMetadata = new MediaMetadataRetriever();
             mMediaMetadata.setDataSource(mContext, mVideoPath);
-            animationAvailable = true;
+            mAnimationAvailable = true;
         } catch (Exception e) {
             Log.w(TAG, "Animation resource not found. Will not show animation.");
         } finally {
@@ -86,20 +87,11 @@
         final ImageView playButton = (ImageView) holder.findViewById(R.id.gesture_play_button);
         final View animationFrame = holder.findViewById(R.id.gesture_animation_frame);
 
-        if (!animationAvailable) {
+        if (!mAnimationAvailable) {
             animationFrame.setVisibility(View.GONE);
             return;
         }
 
-        Bitmap bitmap = mMediaMetadata.getFrameAtTime(0);
-        if (bitmap != null) {
-            imageView.setImageDrawable(new BitmapDrawable(bitmap));
-            imageView.setColorFilter(mContext.getResources().getColor(
-                    R.color.gestures_setting_background_color), PorterDuff.Mode.DARKEN);
-        }
-        imageView.setVisibility(View.VISIBLE);
-        playButton.setVisibility(View.VISIBLE);
-
         video.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
@@ -119,13 +111,22 @@
             @Override
             public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int width,
                     int height) {
-                animationFrame.setLayoutParams(new LinearLayout.LayoutParams(width, width));
                 mMediaPlayer = MediaPlayer.create(mContext, mVideoPath);
                 if (mMediaPlayer != null) {
                     mMediaPlayer.setSurface(new Surface(surfaceTexture));
+                    mMediaPlayer.setOnSeekCompleteListener(
+                            new MediaPlayer.OnSeekCompleteListener() {
+                                @Override
+                                public void onSeekComplete(MediaPlayer mp) {
+                                    mPreviewReady = true;
+                                    mMediaPlayer.setOnSeekCompleteListener(null);
+                                }
+                            });
+
                     mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
                         @Override
                         public void onPrepared(MediaPlayer mediaPlayer) {
+                            mediaPlayer.seekTo(0);
                             mediaPlayer.setLooping(true);
                         }
                     });
@@ -150,7 +151,7 @@
 
             @Override
             public void onSurfaceTextureUpdated(SurfaceTexture surfaceTexture) {
-                if (mMediaPlayer.isPlaying() && imageView.getVisibility() == View.VISIBLE) {
+                if (mPreviewReady && imageView.getVisibility() == View.VISIBLE) {
                     imageView.setVisibility(View.GONE);
                 }
             }
diff --git a/src/com/android/settings/gestures/GestureSettings.java b/src/com/android/settings/gestures/GestureSettings.java
index cafba68..a24d810 100644
--- a/src/com/android/settings/gestures/GestureSettings.java
+++ b/src/com/android/settings/gestures/GestureSettings.java
@@ -25,8 +25,12 @@
 import android.provider.Settings.Global;
 import android.provider.Settings.Secure;
 import android.support.v7.preference.Preference;
+import android.support.v7.widget.RecyclerView;
 import android.text.TextUtils;
 import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
 
 import com.android.internal.logging.MetricsProto.MetricsEvent;
 import com.android.settings.R;
@@ -51,6 +55,9 @@
     private static final String PREF_KEY_PICK_UP_AND_NUDGE = "gesture_pick_up_and_nudge";
     private static final String PREF_KEY_SWIPE_DOWN_FINGERPRINT = "gesture_swipe_down_fingerprint";
     private static final String DEBUG_DOZE_COMPONENT = "debug.doze.component";
+    private static final String ARG_SCROLL_TO_PREFERENCE = "gesture_scroll_to_preference";
+
+    private int mScrollPosition = -1;
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
@@ -91,6 +98,27 @@
             removePreference(PREF_KEY_SWIPE_DOWN_FINGERPRINT);
         }
 
+        if (savedInstanceState == null) {
+            final Bundle args = getArguments();
+            if (args != null && args.containsKey(ARG_SCROLL_TO_PREFERENCE)) {
+                String prefKey = args.getString(ARG_SCROLL_TO_PREFERENCE);
+                GesturePreference pref = (GesturePreference) findPreference(prefKey);
+                if (pref != null) {
+                    mScrollPosition = pref.getOrder();
+                }
+            }
+        }
+
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        View view = super.onCreateView(inflater, container, savedInstanceState);
+        if (mScrollPosition >= 0) {
+            getListView().scrollToPosition(mScrollPosition);
+        }
+        return view;
     }
 
     @Override
diff --git a/src/com/android/settings/overlay/SupportFeatureProvider.java b/src/com/android/settings/overlay/SupportFeatureProvider.java
index c535622..4d8e3d6 100644
--- a/src/com/android/settings/overlay/SupportFeatureProvider.java
+++ b/src/com/android/settings/overlay/SupportFeatureProvider.java
@@ -71,7 +71,8 @@
      * Returns localized string for operation hours in specified country. If country is null, use
      * current country to figure out operation hours.
      */
-    CharSequence getOperationHours(Context context, @SupportType int type, String countryCode);
+    CharSequence getOperationHours(Context context, @SupportType int type, String countryCode,
+            boolean hasInternet);
 
     /**
      * Returns a localized string indicating estimated wait time for a support time.
diff --git a/src/com/android/settings/widget/AspectRatioFrameLayout.java b/src/com/android/settings/widget/AspectRatioFrameLayout.java
new file mode 100644
index 0000000..14d7921
--- /dev/null
+++ b/src/com/android/settings/widget/AspectRatioFrameLayout.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2016 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.
+ */
+
+package com.android.settings.widget;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import android.widget.FrameLayout;
+
+import com.android.settings.R;
+
+/**
+ * A {@link FrameLayout} with customizable aspect ration.
+ * This is used to avoid dynamically calculating the height for the frame. Default aspect
+ * ratio will be 1 if none is set in layout attribute.
+ */
+public final class AspectRatioFrameLayout extends FrameLayout {
+
+    private float mAspectRatio = 1.0f;
+
+    public AspectRatioFrameLayout(Context context) {
+        this(context, null);
+    }
+
+    public AspectRatioFrameLayout(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public AspectRatioFrameLayout(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+        if (attrs != null) {
+            TypedArray array =
+                    context.obtainStyledAttributes(attrs, R.styleable.AspectRatioFrameLayout);
+            mAspectRatio = array.getFloat(
+                    R.styleable.AspectRatioFrameLayout_aspectRatio, 1.0f);
+            array.recycle();
+        }
+    }
+
+    @Override
+    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        super.onMeasure(widthMeasureSpec, (int) (widthMeasureSpec / mAspectRatio));
+    }
+
+}
