Merge "Create ResourceBasedOverride for SearchSessionManager." into tm-dev
diff --git a/protos/launcher_atom.proto b/protos/launcher_atom.proto
index a61e430..4127650 100644
--- a/protos/launcher_atom.proto
+++ b/protos/launcher_atom.proto
@@ -121,6 +121,7 @@
   optional int32 cardinality = 2;
 }
 
+// Next value 39
 enum Attribute {
   UNKNOWN = 0;
   DEFAULT_LAYOUT = 1;       // icon automatically placed in workspace, folder, hotseat
@@ -166,11 +167,13 @@
   ALL_APPS_SEARCH_RESULT_ASSISTANT_MEMORY = 31;
 
   // Suggestion Type provided by AGA
-  ONE_SEARCH_WEB_QUERY = 32;
-  ONE_SEARCH_WEB_TRENDING = 33;
-  ONE_SEARCH_WEB_ENTITY = 34;
-  ONE_SEARCH_WEB_ANSWER = 35;
-  ONE_SEARCH_WEB_PERSONAL = 36;
+  WEB_SEARCH_RESULT_QUERY = 32;
+  WEB_SEARCH_RESULT_TRENDING = 33;
+  WEB_SEARCH_RESULT_ENTITY = 34;
+  WEB_SEARCH_RESULT_ANSWER = 35;
+  WEB_SEARCH_RESULT_PERSONAL = 36;
+  WEB_SEARCH_RESULT_CALCULATOR = 37;
+  WEB_SEARCH_RESULT_URL = 38;
 
   WIDGETS_BOTTOM_TRAY = 28;
   WIDGETS_TRAY_PREDICTION = 29;
diff --git a/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java b/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java
index f6002ec..13007ea 100644
--- a/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java
+++ b/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java
@@ -403,7 +403,7 @@
                             String.format("(State:%s->%s)", getStateString(srcState),
                                     getStateString(dstState)));
                 }
-                if (mItemInfo != DEFAULT_ITEM_INFO) {
+                if (atomInfo.hasContainerInfo()) {
                     logStringBuilder.append("\n").append(atomInfo);
                 }
                 Log.d(TAG, logStringBuilder.toString());
@@ -492,9 +492,7 @@
                 String name = (event instanceof Enum) ? ((Enum) event).name() :
                         event.getId() + "";
                 StringBuilder logStringBuilder = new StringBuilder("\n");
-                if (mInstanceId != DEFAULT_INSTANCE_ID) {
-                    logStringBuilder.append(String.format("InstanceId:%s ", mInstanceId));
-                }
+                logStringBuilder.append(String.format("InstanceId:%s ", mInstanceId));
                 logStringBuilder.append(String.format("%s=%sms", name, mLatencyInMillis));
                 Log.d(LATENCY_TAG, logStringBuilder.toString());
             }
diff --git a/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java b/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java
index 9b38853..ae00d82 100644
--- a/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java
+++ b/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java
@@ -57,6 +57,7 @@
 import com.android.launcher3.testcomponent.TestCommandReceiver;
 import com.android.launcher3.util.Wait;
 import com.android.launcher3.util.rule.FailureWatcher;
+import com.android.launcher3.util.rule.ScreenRecordRule;
 import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord;
 import com.android.quickstep.views.RecentsView;
 
@@ -91,6 +92,9 @@
     @Rule
     public final TestRule mOrderSensitiveRules;
 
+    @Rule
+    public ScreenRecordRule mScreenRecordRule = new ScreenRecordRule();
+
     public FallbackRecentsTest() throws RemoteException {
         Instrumentation instrumentation = getInstrumentation();
         Context context = instrumentation.getContext();
diff --git a/src/com/android/launcher3/util/window/WindowManagerProxy.java b/src/com/android/launcher3/util/window/WindowManagerProxy.java
index 2fd0a7e..5aaa275 100644
--- a/src/com/android/launcher3/util/window/WindowManagerProxy.java
+++ b/src/com/android/launcher3/util/window/WindowManagerProxy.java
@@ -165,6 +165,17 @@
         insetsBuilder.setInsets(WindowInsets.Type.navigationBars(), newNavInsets);
         insetsBuilder.setInsetsIgnoringVisibility(WindowInsets.Type.navigationBars(), newNavInsets);
 
+        Insets statusBarInsets = oldInsets.getInsets(WindowInsets.Type.statusBars());
+        int statusBarHeight = getDimenByName("status_bar_height", systemRes, 0);
+        Insets newStatusBarInsets = Insets.of(
+                statusBarInsets.left,
+                Math.max(statusBarInsets.top, statusBarHeight),
+                statusBarInsets.right,
+                statusBarInsets.bottom);
+        insetsBuilder.setInsets(WindowInsets.Type.statusBars(), newStatusBarInsets);
+        insetsBuilder.setInsetsIgnoringVisibility(
+                WindowInsets.Type.statusBars(), newStatusBarInsets);
+
         // Override the tappable insets to be 0 on the bottom for gesture nav (otherwise taskbar
         // would count towards it). This is used for the bottom protection in All Apps for example.
         if (isGesture) {