<!--
 * Copyright 2015 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
-->

<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="org.chromium.webview_shell"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28" />

    <!-- "Normal" permissions which do not require user prompt -->
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
    <uses-permission android:name="android.permission.USE_CREDENTIALS"/>

    <!-- "Dangerous" permissions which require user prompt -->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.GET_ACCOUNTS"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <uses-permission android:name="android.permission.RUN_INSTRUMENTATION" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.Light"
        android:networkSecurityConfig="@xml/network_security_config" >
        <meta-data android:name="android.webkit.WebView.EnableSafeBrowsing"
            android:value="true" />
        <activity
            android:name="org.chromium.webview_shell.TelemetryActivity"
            android:launchMode="singleTask"
            android:label="@string/title_activity_telemetry"
            android:exported="true">
        </activity>
        <activity
            android:name="org.chromium.webview_shell.TelemetryMemoryPressureActivity"
            android:launchMode="singleTask"
            android:label="@string/title_activity_telemetry"
            android:exported="true">
        </activity>
        <activity
            android:name="org.chromium.webview_shell.JankActivity"
            android:label="@string/title_activity_jank"
            android:noHistory="true"
            android:exported="true">
        </activity>
        <activity
            android:name="org.chromium.webview_shell.StartupTimeActivity"
            android:label="@string/title_activity_startup_time"
            android:noHistory="true"
            android:exported="true">
        </activity>
        <activity
            android:name="org.chromium.webview_shell.WebViewCreateDestroyActivity"
            android:launchMode="singleTask"
            android:label="@string/title_activity_create_destroy"
            android:exported="true">
        </activity>
        <activity
            android:name="org.chromium.webview_shell.WebViewBrowserActivity"
            android:label="@string/title_activity_browser"
            android:exported="true"
            android:windowSoftInputMode="adjustResize"
            android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|density">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <!-- Catch intents which do not specify a MIME type -->
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="http" />
                <data android:scheme="https" />
            </intent-filter>
            <!-- Catch intents which do specify a MIME type -->
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="http" />
                <data android:scheme="https" />
                <data android:mimeType="text/html"/>
                <data android:mimeType="text/plain"/>
                <data android:mimeType="application/xhtml+xml"/>
                <data android:mimeType="application/vnd.wap.xhtml+xml"/> <!-- XHTML MP -->
            </intent-filter>
        </activity>
        <activity
            android:name="org.chromium.webview_shell.WebViewLayoutTestActivity"
            android:label="@string/title_activity_layout_test"
            android:exported="true">
        </activity>
        <activity
            android:name="org.chromium.webview_shell.WebViewThreadTestActivity"
            android:label="@string/title_activity_thread_test"
            android:exported="true">
        </activity>
        <activity android:name="org.chromium.test.broker.OnDeviceInstrumentationBroker"
            android:exported="true"/>

        <activity
            android:name="org.chromium.webview_shell.PageCyclerTestActivity"
            android:label="@string/title_activity_page_cycler"
            android:exported="true">
        </activity>

        <activity
            android:name="org.chromium.webview_shell.WebViewTracingActivity"
            android:label="@string/title_activity_telemetry"
            android:noHistory="true"
            android:exported="true">
        </activity>

        <activity
            android:name="org.chromium.webview_shell.WebViewAnimationTestActivity"
            android:noHistory="true"
            android:exported="true">
        </activity>

        <uses-library android:name="android.test.runner" />
    </application>
</manifest>