Merge "Introduce config_wifi_revert_country_code_on_cellular_loss" into mnc-dr-dev
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index d4e6c82..4055836 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -2259,6 +2259,7 @@
         private final AtomicInteger mRefCount;
         private static final String TAG = "ConnectivityManager.CallbackHandler";
         private final ConnectivityManager mCm;
+        private static final boolean DBG = false;
 
         CallbackHandler(Looper looper, HashMap<NetworkRequest, NetworkCallback>callbackMap,
                 AtomicInteger refCount, ConnectivityManager cm) {
@@ -2270,7 +2271,7 @@
 
         @Override
         public void handleMessage(Message message) {
-            Log.d(TAG, "CM callback handler got msg " + message.what);
+            if (DBG) Log.d(TAG, "CM callback handler got msg " + message.what);
             NetworkRequest request = (NetworkRequest) getObject(message, NetworkRequest.class);
             Network network = (Network) getObject(message, Network.class);
             switch (message.what) {
diff --git a/docs/html/training/auto/start/index.jd b/docs/html/training/auto/start/index.jd
index f6cdbd1..6c6f188 100644
--- a/docs/html/training/auto/start/index.jd
+++ b/docs/html/training/auto/start/index.jd
@@ -177,7 +177,7 @@
      href="https://play.google.com/store/apps/details?id=com.google.android.projection.gearhead&hl=en"
      >Android Auto app</a> on the mobile device.</li>
   <li>Open the <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a> and
-    download the DHU package <strong>Android Auto Desktop Head Unit</strong> from the
+    download the DHU package <strong>Android Auto Desktop Head Unit emulator</strong> from the
     <em>SDK Tools</em> tab. The DHU installs in the <code>&lt;sdk&gt;/extras/google/auto/</code>
     directory.</li>
   <li>If you are running the DHU on Linux, you must also install
diff --git a/docs/html/training/sign-in/index.jd b/docs/html/training/sign-in/index.jd
index 9d49fd9..d7c8e1d 100644
--- a/docs/html/training/sign-in/index.jd
+++ b/docs/html/training/sign-in/index.jd
@@ -1,5 +1,5 @@
 page.title=Adding Sign-In
-page.tags=authentication,signin,social,google+
+page.tags=authentication,signin
 page.article=true
 page.trainingcourse=true
 @jd:body
@@ -11,13 +11,13 @@
   alt="Google maps sample image">
 
 <p>
-  The Google+ platform for Android lets you authenticate a user with the same credentials they use
-  on Google every day. Once a user signs in with Google, you can create more engaging experiences
-  and drive usage of your app.
+  Google Sign-In for Android lets you authenticate a user with the same credentials they use on 
+  Google. After a user signs in with Google, you can create more engaging experiences and drive 
+  usage of your app.
 </p>
 
 <p>
-  The <a href="https://developers.google.com/+/mobile/android/">Google+ Android API</a> allows
+  The <a href="https://developers.google.com/identity/sign-in/android/">Google Android API</a> allows
   you to integrate sign-in and social features into your app.
 </p>
 
@@ -26,43 +26,27 @@
 
 <h4>Trusted authentication</h4>
 <p>
-  Google+ Sign-In is a simple, trusted, and secure way to let people sign in to your app with their
-  Google credentials and bring along their Google+ info.<br>
-  <a href="https://developers.google.com/+/mobile/android/sign-in" class="external-link">Add
-  sign-in</a>.
+  Google Sign-In is a simple, trusted, and secure way to let people sign in to your app with their
+  Google credentials.<br>
+  <a href="https://developers.google.com/identity/sign-in/android/sign-in" class="external-link">Add
+  Sign-in</a>.
 </p>
 
 <h4>Access the profile and social graph</h4>
 <p>
-  Once users have signed in with Google, your app can welcome them by name, display their picture,
-  connect them with friends, and lots more.<br>
-  <a href="https://developers.google.com/+/mobile/android/people" class="external-link">Access the
-  social graph</a>.
-</p>
-
-<h4>Stand out in the stream</h4>
-<p>
-  Interactive posts is a rich way of sharing to Google+. It lets users prompt friends to take
-  specific actions in your app from a Google+ post, like "listen," "RSVP," "check-in," and over 100
-  more actions.<br>
-  <a class="external-link" href="https://developers.google.com/+/mobile/android/share">Post
-  interactive content</a>.
-</p>
-
-<h4>Recommend content</h4>
-<p>
-  Add a native +1 button so users can recommend content from your app. These endorsements can give
-  your app more credibility and help it grow faster.<br>
-  <a class="external-link" href="https://developers.google.com/+/mobile/android/recommend">Add the
-  +1 button</a>.
+  After users have signed in with Google, your app can welcome them by name and display their 
+  picture. If your app requests social scopes, it can connect users with friends, and access  
+  age range, language, and public profile information.<br>
+  <a href="https://developers.google.com/identity/sign-in/android/people" class="external-link">
+  Getting Profile Information</a>.
 </p>
 
 
 <h2 id="start">Get Started</h2>
 <p>
-  The Google+ Android APIs are part of the Google Play services platform. To use Google+ features,
+  The Google Android APIs are part of the Google Play services platform. To use Google features,
   set up the Google Play services SDK in your app development project. For more information, see
   the <a class="external-link" href=
-  "https://developers.google.com/+/mobile/android/getting-started">Getting Started</a> guide for
-  the Google+ Platform for Android
+  "https://developers.google.com/identity/sign-in/android/start-integrating">Start Integrating</a> 
+  guide for Google Sign-In.
 </p>
\ No newline at end of file
diff --git a/packages/Keyguard/res/values-ja/strings.xml b/packages/Keyguard/res/values-ja/strings.xml
index 502a2ed..cea4319 100644
--- a/packages/Keyguard/res/values-ja/strings.xml
+++ b/packages/Keyguard/res/values-ja/strings.xml
@@ -112,7 +112,7 @@
     <string name="airplane_mode" msgid="3122107900897202805">"機内モード"</string>
     <string name="kg_prompt_reason_restart_pattern" msgid="489430505491862444">"端末を再起動するにはパターンが必要です。"</string>
     <string name="kg_prompt_reason_restart_pin" msgid="994878216570694974">"端末を再起動するにはPINが必要です。"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="2375742919528461664">"端末を再起動するにはパスワードが必要です。"</string>
+    <string name="kg_prompt_reason_restart_password" msgid="2375742919528461664">"端末を再起動した時にはパスワードが必要です。"</string>
     <string name="kg_prompt_reason_timeout_pattern" msgid="8930047492617900785">"セキュリティを強化するため、パターンが必要です。"</string>
     <string name="kg_prompt_reason_timeout_pin" msgid="7470468607947726377">"セキュリティを強化するため、PINが必要です。"</string>
     <string name="kg_prompt_reason_timeout_password" msgid="1177412542773936957">"セキュリティを強化するため、パスワードが必要です。"</string>
diff --git a/packages/SystemUI/src/com/android/systemui/ExpandHelper.java b/packages/SystemUI/src/com/android/systemui/ExpandHelper.java
index b0e2afa..1dca149 100644
--- a/packages/SystemUI/src/com/android/systemui/ExpandHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/ExpandHelper.java
@@ -112,7 +112,9 @@
         public boolean onScaleBegin(ScaleGestureDetector detector) {
             if (DEBUG_SCALE) Log.v(TAG, "onscalebegin()");
 
-            startExpanding(mResizedView, STRETCH);
+            if (!mOnlyMovements) {
+                startExpanding(mResizedView, STRETCH);
+            }
             return mExpanding;
         }
 
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 2bcee91..1f4427f 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -511,7 +511,6 @@
 
             ArrayList<NetworkAgentInfo> list = mTypeLists[type];
             if (list.contains(nai)) {
-                loge("Attempting to register duplicate agent for type " + type + ": " + nai);
                 return;
             }
 
@@ -4280,7 +4279,7 @@
         boolean keep = newNetwork.isVPN();
         boolean isNewDefault = false;
         NetworkAgentInfo oldDefaultNetwork = null;
-        if (DBG) log("rematching " + newNetwork.name());
+        if (VDBG) log("rematching " + newNetwork.name());
         // Find and migrate to this Network any NetworkRequests for
         // which this network is now the best.
         ArrayList<NetworkAgentInfo> affectedNetworks = new ArrayList<NetworkAgentInfo>();
@@ -4317,6 +4316,7 @@
                 }
                 if (currentNetwork == null ||
                         currentNetwork.getCurrentScore() < newNetwork.getCurrentScore()) {
+                    if (DBG) log("rematch for " + newNetwork.name());
                     if (currentNetwork != null) {
                         if (DBG) log("   accepting network in place of " + currentNetwork.name());
                         currentNetwork.networkRequests.remove(nri.request.requestId);