Merge "TraceProcessor: use base::FlatHashMap<> where possible"
diff --git a/src/trace_processor/metrics/sql/android/android_multiuser_populator.sql b/src/trace_processor/metrics/sql/android/android_multiuser_populator.sql
index 98a4b16..c1726ff 100644
--- a/src/trace_processor/metrics/sql/android/android_multiuser_populator.sql
+++ b/src/trace_processor/metrics/sql/android/android_multiuser_populator.sql
@@ -14,6 +14,9 @@
 -- limitations under the License.
 --
 
+-- Create the base tables and views containing the launch spans.
+SELECT RUN_METRIC('android/startup/launches.sql');
+
 -- Collect the important timestamps for Multiuser events.
 DROP VIEW IF EXISTS multiuser_events;
 CREATE VIEW multiuser_events AS
@@ -31,9 +34,9 @@
     )
   ),
   (
-    SELECT slice.ts + slice.dur AS launcher_end_time_ns
-    FROM slice
-    WHERE (slice.name = "launching: com.google.android.apps.nexuslauncher")
+    SELECT ts_end AS launcher_end_time_ns
+    FROM launches
+    WHERE (package = 'com.android.launcher3' OR package = 'com.google.android.apps.nexuslauncher')
   ),
   (
     SELECT MIN(slice.ts) AS user_create_time_ns
diff --git a/test/trace_processor/parsing/android_multiuser_switch.textproto b/test/trace_processor/parsing/android_multiuser_switch.textproto
index 4798139..d2a836c 100644
--- a/test/trace_processor/parsing/android_multiuser_switch.textproto
+++ b/test/trace_processor/parsing/android_multiuser_switch.textproto
@@ -1,11 +1,29 @@
 packet {
+  process_tree {
+    processes {
+      pid: 2609
+      ppid: 129
+      cmdline: "system_server"
+      uid: 1000
+    }
+  }
+  process_tree {
+    processes {
+      pid: 5993
+      ppid: 129
+      cmdline: "com.android.systemui"
+      uid: 10216
+    }
+  }
+}
+packet {
   ftrace_events {
     cpu: 3
     event {
       timestamp: 3000000000 # 3e9
       pid: 4064
       print {
-        buf: "S|1204|UserDetailView.Adapter#onClick|0\n"
+        buf: "S|5993|UserDetailView.Adapter#onClick|0\n"
       }
     }
   }
@@ -17,7 +35,31 @@
       timestamp: 3100000000
       pid: 4064
       print {
-        buf: "F|1204|UserDetailView.Adapter#onClick|0\n"
+        buf: "F|5993|UserDetailView.Adapter#onClick|0\n"
+      }
+    }
+  }
+}
+packet {
+  ftrace_events {
+    cpu: 2
+    event {
+      timestamp: 5186970000
+      pid: 4032
+      print {
+        buf: "S|2609|MetricsLogger:launchObserverNotifyIntentStarted|0\n"
+      }
+    }
+  }
+}
+packet {
+  ftrace_events {
+    cpu: 2
+    event {
+      timestamp: 5187000000
+      pid: 4032
+      print {
+        buf: "F|2609|MetricsLogger:launchObserverNotifyIntentStarted|0\n"
       }
     }
   }
@@ -29,7 +71,7 @@
       timestamp: 5200000000
       pid: 4065
       print {
-        buf: "S|1204|launching: com.google.android.apps.nexuslauncher|0\n"
+        buf: "S|2609|launching: com.google.android.apps.nexuslauncher|0\n"
       }
     }
   }
@@ -41,8 +83,32 @@
       timestamp: 7900000000 # 7.9e9
       pid: 4065
       print {
-        buf: "F|1204|launching: com.google.android.apps.nexuslauncher|0\n"
+        buf: "F|2609|launching: com.google.android.apps.nexuslauncher|0\n"
       }
     }
   }
-}
\ No newline at end of file
+}
+packet {
+  ftrace_events {
+    cpu: 2
+    event {
+      timestamp: 7900016000
+      pid: 4075
+      print {
+        buf: "S|2609|MetricsLogger:launchObserverNotifyActivityLaunchFinished|0\n"
+      }
+    }
+  }
+}
+packet {
+  ftrace_events {
+    cpu: 2
+    event {
+      timestamp: 7900516000
+      pid: 4075
+      print {
+        buf: "F|2609|MetricsLogger:launchObserverNotifyActivityLaunchFinished|0\n"
+      }
+    }
+  }
+}
diff --git a/ui/release/channels.json b/ui/release/channels.json
index 33c7f2f..359228c 100644
--- a/ui/release/channels.json
+++ b/ui/release/channels.json
@@ -2,7 +2,7 @@
   "channels": [
     {
       "name": "stable",
-      "rev": "6f7273f220d1812e315be627605be2561c617ed7"
+      "rev": "b4bd17f12d544c7b09cc93c6e7ed22e80ed73e48"
     },
     {
       "name": "canary",
diff --git a/ui/src/frontend/record_page.ts b/ui/src/frontend/record_page.ts
index a1e3fd7..e71909f 100644
--- a/ui/src/frontend/record_page.ts
+++ b/ui/src/frontend/record_page.ts
@@ -754,7 +754,7 @@
         m(Toggle, {
           title: 'Resolve kernel symbols',
           cssClass: '.thin',
-          descr: `Enables lookup via /proc/kallsyms for workqueue, 
+          descr: `Enables lookup via /proc/kallsyms for workqueue,
               sched_blocked_reason and other events (userdebug/eng builds only).`,
           setEnabled: (cfg, val) => cfg.symbolizeKsyms = val,
           isEnabled: (cfg) => cfg.symbolizeKsyms
@@ -1434,7 +1434,7 @@
                 }
               },
               m(`li${routePage === 'config' ? '.active' : ''}`,
-                m('i.material-icons', 'tune'),
+                m('i.material-icons', 'save'),
                 m('.title', 'Saved configs'),
                 m('.sub', 'Manage local configs'))) :
             null),