<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
	<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.FOREGROUND_SERVICE" />
	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28"/>
	<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />

	<!-- Disable input emulation on ChromeOS -->
	<uses-feature android:name="android.hardware.type.pc" android:required="false"/>

	<!-- Signal support for Android TV -->
	<uses-feature android:name="android.software.leanback" android:required="false" />
	<uses-feature android:name="android.hardware.touchscreen" android:required="false" />

	<application android:label="Tailscale" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round"
                     android:banner="@drawable/tv_banner"
                     android:name=".App" android:allowBackup="false">
		<activity android:name="IPNActivity"
			android:label="@string/app_name"
			android:theme="@style/Theme.GioApp"
			android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden"
			android:windowSoftInputMode="adjustResize"
			android:launchMode="singleTask"
			android:exported="true">
			<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>
			<intent-filter>
				<action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES" />
			</intent-filter>
			<intent-filter>
				<action android:name="android.intent.action.SEND" />
				<category android:name="android.intent.category.DEFAULT"/>
				<data android:mimeType="application/*" />
				<data android:mimeType="audio/*" />
				<data android:mimeType="image/*" />
				<data android:mimeType="message/*" />
				<data android:mimeType="multipart/*" />
				<data android:mimeType="text/*" />
				<data android:mimeType="video/*" />
			</intent-filter>
			<intent-filter>
				<action android:name="android.intent.action.SEND_MULTIPLE" />
				<category android:name="android.intent.category.DEFAULT" />
				<data android:mimeType="application/*" />
				<data android:mimeType="audio/*" />
				<data android:mimeType="image/*" />
				<data android:mimeType="message/*" />
				<data android:mimeType="multipart/*" />
				<data android:mimeType="text/*" />
				<data android:mimeType="video/*" />
			</intent-filter>
		</activity>
		<receiver android:name="IPNReceiver"
			android:exported="true"
			>
			<intent-filter>
				<action android:name="com.tailscale.ipn.CONNECT_VPN" />
				<action android:name="com.tailscale.ipn.DISCONNECT_VPN" />
			</intent-filter>
		</receiver>
		<service android:name=".IPNService"
			android:permission="android.permission.BIND_VPN_SERVICE"
			android:exported="false">
			<intent-filter>
				<action android:name="android.net.VpnService"/>
			</intent-filter>
		</service>
		<service
			android:name=".QuickToggleService"
			android:icon="@drawable/ic_tile"
			android:label="@string/tile_name"
			android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
			android:exported="true">
		<intent-filter>
			<action android:name="android.service.quicksettings.action.QS_TILE"/>
		</intent-filter>
	</service>
	</application>
</manifest>

