<?xml version="1.0" encoding="utf-8"?><!--
  This file is part of BOINC.
  http://boinc.berkeley.edu
  Copyright (C) 2021 University of California

  BOINC is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License
  as published by the Free Software Foundation,
  either version 3 of the License, or (at your option) any later version.

  BOINC is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public License
  along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="edu.berkeley.boinc"
        android:installLocation="internalOnly">
    <!-- installation on SD card would break boot receiver -->
    <!-- Add Google Play store metadata informing the store we can run on tablets and other large screen devices -->
    <supports-screens
            android:anyDensity="true"
            android:largeScreens="true"
            android:normalScreens="true"
            android:smallScreens="true"
            android:xlargeScreens="true" /> <!-- Required Permissions -->
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <!--
 Features required for Android TV, consoles, and set-top boxes like Nexus Player, OUYA,
         Razer Forge TV, Nvidia SHIELD, etc
    -->
    <!-- Effectively a hint for the Google Play store only and at the Leanback UI Library -->
    <uses-feature
            android:name="android.software.leanback"
            android:required="false" />
    <uses-feature
            android:name="android.hardware.gamepad"
            android:required="false" /> <!-- Implies some sort of D-pad, game controller, joystick, remote control, etc -->
    <uses-feature
            android:name="android.hardware.touchscreen"
            android:required="false" />
    <uses-feature
            android:name="android.hardware.type.television"
            android:required="false" /> <!-- Effectively a hint for the Google Play store only -->

    <application
            android:name=".BOINCApplication"
            android:allowBackup="true"
            android:banner="@drawable/ic_boinc_logo"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:largeHeap="true"
            android:theme="@style/AppTheme">
        <activity
                android:name=".ui.eventlog.EventLogActivity"
                android:label="@string/menu_eventlog">
            <meta-data
                    android:name="android.support.PARENT_ACTIVITY"
                    android:value="edu.berkeley.boinc.BOINCActivity" />
        </activity>
        <activity
                android:name=".SplashActivity"
                android:configChanges="orientation|keyboardHidden|screenSize"
                android:label="@string/app_name"
                android:noHistory="true"
                android:theme="@style/AppTheme.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
                android:name=".BOINCActivity"
                android:exported="true"
                android:label="@string/app_name"
                android:launchMode="singleTop" />
        <activity
                android:name=".attach.SelectionListActivity"
                android:theme="@style/AppTheme.NoActionBar" />
        <activity
                android:name=".attach.CredentialInputActivity"
                android:theme="@style/AppTheme.NoActionBar"
                android:windowSoftInputMode="adjustPan" />
        <activity
                android:name=".attach.BatchProcessingActivity"
                android:theme="@style/AppTheme.NoActionBar" />
        <activity
                android:name=".attach.BatchConflictListActivity"
                android:theme="@style/AppTheme.NoActionBar" />
        <activity
                android:name=".LicenseActivity"
                android:configChanges="orientation|keyboardHidden|screenSize"
                android:label="@string/app_name"
                android:noHistory="true"
                android:theme="@style/AppTheme.NoActionBar" />
        <activity
                android:name=".WelcomeActivity"
                android:configChanges="orientation|keyboardHidden|screenSize"
                android:label="@string/app_name"
                android:noHistory="true"
                android:theme="@style/AppTheme.NoActionBar" />
        <activity
                android:name=".attach.AttachActivity"
                android:theme="@style/AppTheme.NoActionBar" />
        <activity
                android:name=".attach.AttachAccountManagerActivity"
                android:noHistory="true"
                android:theme="@style/AppTheme.NoActionBar" />

        <service
                android:name=".client.Monitor"
                android:process=":remote" />
        <service android:name=".attach.ProjectAttachService" />

        <receiver android:name=".receiver.BootReceiver"
                  android:permission="android.permission.RECEIVE_BOOT_COMPLETED" >
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.QUICKBOOT_POWERON" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </receiver>
        <receiver android:name=".receiver.PowerConnectedReceiver">
        <intent-filter>
                <action android:name="android.intent.action.ACTION_POWER_CONNECTED" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </receiver>
        <receiver android:name=".receiver.PackageReplacedReceiver">
            <intent-filter>
                <action android:name="android.intent.action.PACKAGE_REPLACED" />
                <category android:name="android.intent.category.DEFAULT" />
                <data
                        android:path="edu.berkeley.boinc"
                        android:scheme="package" />
            </intent-filter>
        </receiver>

        <activity
                android:name=".BoincNotExclusiveDialog"
                android:theme="@style/Theme.AppCompat.DayNight.Dialog" />
    </application>

</manifest>
