Do not read bounds from intent

Private intents can have data we can't parse. Only read bounds from
ActivityOptions.

bug: 24759242
Change-Id: I612f9892c174bc2078eec077a2389e3203a92e68
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index cda9a5d..8bd9462 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -1863,17 +1863,11 @@
 
         boolean overrideBounds = false;
         Rect newBounds = null;
-        if (r.info.resizeable || (inTask != null && inTask.mResizeable)) {
-            if (intent.hasExtra(ActivityOptions.KEY_BOUNDS)) {
+        if (options != null && (r.info.resizeable || (inTask != null && inTask.mResizeable))) {
+            ActivityOptions opts = new ActivityOptions(options);
+            if (opts.hasBounds()) {
                 overrideBounds = true;
-                newBounds = Rect.unflattenFromString(
-                        intent.getStringExtra(ActivityOptions.KEY_BOUNDS));
-            } else if (options != null) {
-                ActivityOptions opts = new ActivityOptions(options);
-                if (opts.hasBounds()) {
-                    overrideBounds = true;
-                    newBounds = opts.getBounds();
-                }
+                newBounds = opts.getBounds();
             }
         }