Using ViewStub to defer the inflation of GeolocationPermissionsPrompt until we first show it.
This should shave 5% of Browser start up time.
Fix http://b/issue?id=2604295
diff --git a/res/layout/geolocation_permissions_prompt.xml b/res/layout/geolocation_permissions_prompt.xml
index cdb25d2..babde3a 100755
--- a/res/layout/geolocation_permissions_prompt.xml
+++ b/res/layout/geolocation_permissions_prompt.xml
@@ -16,7 +16,8 @@
This is the layout for the Geolocation permissions prompt.
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.browser.GeolocationPermissionsPrompt
+ xmlns:android="http://schemas.android.com/apk/res/android"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@@ -87,4 +88,4 @@
</LinearLayout>
</LinearLayout>
-</LinearLayout>
+</com.android.browser.GeolocationPermissionsPrompt>
diff --git a/res/layout/tab.xml b/res/layout/tab.xml
index abef51d..69baf56 100755
--- a/res/layout/tab.xml
+++ b/res/layout/tab.xml
@@ -32,8 +32,8 @@
android:layout_weight="1" />
<!-- Geolocation permissions prompt -->
- <com.android.browser.GeolocationPermissionsPrompt
- android:id="@+id/geolocation_permissions_prompt"
+ <ViewStub android:id="@+id/geolocation_permissions_prompt"
+ android:layout="@layout/geolocation_permissions_prompt"
android:layout_width="match_parent"
android:layout_height="wrap_content" />