Grant camera permissions at the start of the test

Avoid eventually showing the permission dialog and ensure a consistent UI flow

Fixes: 307451253
Fixes: 307664397
Test: atest FlickerTestsAppLaunch
Change-Id: If860a89b5bd3521f73fd4aef4ad855f840e1400f
diff --git a/tests/FlickerTests/AndroidTestTemplate.xml b/tests/FlickerTests/AndroidTestTemplate.xml
index 85709c9..ed71531 100644
--- a/tests/FlickerTests/AndroidTestTemplate.xml
+++ b/tests/FlickerTests/AndroidTestTemplate.xml
@@ -28,7 +28,13 @@
         <option name="run-command" value="su root service call SurfaceFlinger 1029 i32 81920"/>
         <!-- b/307664397 - Ensure camera has the correct permissions and doesn't show a dialog -->
         <option name="run-command"
+                value="pm grant com.google.android.GoogleCamera android.permission.CAMERA"/>
+        <option name="run-command"
+                value="pm grant com.google.android.GoogleCamera android.permission.RECORD_AUDIO"/>
+        <option name="run-command"
                 value="pm grant com.google.android.GoogleCamera android.permission.ACCESS_FINE_LOCATION"/>
+        <option name="run-command"
+                value="pm grant com.google.android.GoogleCamera android.permission.ACCESS_COARSE_LOCATION"/>
     </target_preparer>
     <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
         <option name="test-user-token" value="%TEST_USER%"/>