Always send configuration changes to activity.

We are not sending override configuration changes to activities if the change in
configuration is not significant enough (i.e did resources will not be reloaded
due to the change). This breaks apps that rely on getting onConfigurationChanged()
call whenever the config changes regardless of if resources will be reloaded.
We no deliver all configuration changes to the activity.

Bug: 28177873
Bug: 23904868
Change-Id: Icc979dabb8bc93ae8a976ef6074cd2559aedca67
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 837a1c1..b043311 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -4362,12 +4362,12 @@
         if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG_CONFIGURATION,
                 "Ensuring correct configuration: " + r);
 
-        // Short circuit: if the two configurations are the exact same
-        // object (the common case), then there is nothing to do.
+        // Short circuit: if the two configurations are equal (the common case), then there is
+        // nothing to do.
         final Configuration newConfig = mService.mConfiguration;
         final Configuration taskConfig = r.task.mOverrideConfig;
-        if (r.configuration == newConfig
-                && r.taskConfigOverride == taskConfig
+        if (r.configuration.equals(newConfig)
+                && r.taskConfigOverride.equals(taskConfig)
                 && !r.forceNewConfig) {
             if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG_CONFIGURATION,
                     "Configuration unchanged in " + r);
@@ -4396,7 +4396,7 @@
                     "Configuration no differences in " + r);
             // There are no significant differences, so we won't relaunch but should still deliver
             // the new configuration to the client process.
-            r.scheduleConfigurationChanged(taskConfig, false);
+            r.scheduleConfigurationChanged(taskConfig, true);
             return true;
         }