<?xml version="1.0" encoding="utf-8"?>
<manifest
	package="org.briarproject.briar"
	xmlns:android="http://schemas.android.com/apk/res/android">

	<uses-feature android:name="android.hardware.bluetooth"/>
	<uses-feature android:name="android.hardware.camera" />

	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
	<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
	<uses-permission android:name="android.permission.BLUETOOTH" />
	<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
	<uses-permission android:name="android.permission.CAMERA" />
	<uses-permission android:name="android.permission.INTERNET" />
	<uses-permission android:name="android.permission.READ_LOGS"/>
	<uses-permission android:name="android.permission.VIBRATE" />
	<uses-permission android:name="android.permission.WAKE_LOCK" />

	<application
		android:name="org.briarproject.briar.android.BriarApplicationImpl"
		android:allowBackup="false"
		android:icon="@mipmap/ic_launcher_round"
		android:label="@string/app_name"
		android:logo="@mipmap/ic_launcher_round"
		android:theme="@style/BriarTheme">

		<service
			android:name="org.briarproject.briar.android.BriarService"
			android:exported="false">
			<intent-filter>
				<action android:name="org.briarproject.briar.android.BriarService"/>
			</intent-filter>
		</service>

		<activity
			android:name="org.briarproject.briar.android.reporting.DevReportActivity"
			android:excludeFromRecents="true"
			android:exported="false"
			android:finishOnTaskLaunch="true"
			android:label="@string/crash_report_title"
			android:launchMode="singleInstance"
			android:process=":briar_error_handler"
			android:theme="@style/BriarTheme.NoActionBar"
			android:windowSoftInputMode="stateHidden">
		</activity>

		<activity
			android:name="org.briarproject.briar.android.splash.ExpiredActivity"
			android:label="@string/app_name">
		</activity>

		<activity
			android:name="org.briarproject.briar.android.login.PasswordActivity"
			android:label="@string/app_name"
			android:windowSoftInputMode="stateVisible">
		</activity>

		<activity
			android:name="org.briarproject.briar.android.login.SetupActivity"
			android:label="@string/setup_title"
			android:windowSoftInputMode="adjustResize">
		</activity>

		<activity
			android:name="org.briarproject.briar.android.splash.SplashScreenActivity"
			android:theme="@style/BriarTheme.NoActionBar"
			android:label="@string/app_name">
			<intent-filter>
				<action android:name="android.intent.action.MAIN"/>
				<category android:name="android.intent.category.LAUNCHER"/>
			</intent-filter>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.navdrawer.NavDrawerActivity"
			android:theme="@style/BriarTheme.NoActionBar"
		    android:launchMode="singleTop">
		</activity>

		<activity
			android:name="org.briarproject.briar.android.contact.ConversationActivity"
			android:label="@string/app_name"
			android:theme="@style/BriarTheme.NoActionBar"
			android:parentActivityName="org.briarproject.briar.android.navdrawer.NavDrawerActivity"
			android:windowSoftInputMode="stateHidden|adjustResize">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.navdrawer.NavDrawerActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.privategroup.creation.CreateGroupActivity"
			android:label="@string/groups_create_group_title"
			android:parentActivityName="org.briarproject.briar.android.navdrawer.NavDrawerActivity"
			android:windowSoftInputMode="adjustResize">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.navdrawer.NavDrawerActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.privategroup.conversation.GroupActivity"
			android:label="@string/app_name"
			android:parentActivityName="org.briarproject.briar.android.navdrawer.NavDrawerActivity"
			android:theme="@style/BriarTheme.NoActionBar"
			android:windowSoftInputMode="adjustResize|stateHidden">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.navdrawer.NavDrawerActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.privategroup.invitation.GroupInvitationActivity"
			android:label="@string/groups_invitations_title"
			android:parentActivityName="org.briarproject.briar.android.navdrawer.NavDrawerActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.navdrawer.NavDrawerActivity"/>
		</activity>

			<activity
			android:name="org.briarproject.briar.android.privategroup.memberlist.GroupMemberListActivity"
			android:label="@string/groups_member_list"
			android:parentActivityName="org.briarproject.briar.android.privategroup.conversation.GroupActivity"
			android:windowSoftInputMode="adjustResize|stateHidden">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.privategroup.conversation.GroupActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.privategroup.reveal.RevealContactsActivity"
			android:label="@string/groups_reveal_contacts"
			android:parentActivityName="org.briarproject.briar.android.privategroup.conversation.GroupActivity"
			android:windowSoftInputMode="adjustResize|stateAlwaysHidden">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.privategroup.conversation.GroupActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.privategroup.creation.GroupInviteActivity"
			android:label="@string/groups_invite_members"
			android:parentActivityName="org.briarproject.briar.android.privategroup.conversation.GroupActivity"
			android:windowSoftInputMode="adjustResize|stateHidden">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.privategroup.conversation.GroupActivity"/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.sharing.ForumInvitationActivity"
			android:label="@string/forum_invitations_title"
			android:parentActivityName="org.briarproject.briar.android.navdrawer.NavDrawerActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.navdrawer.NavDrawerActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.sharing.BlogInvitationActivity"
			android:label="@string/blogs_sharing_invitations_title"
			android:parentActivityName="org.briarproject.briar.android.contact.ConversationActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.contact.ConversationActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.forum.CreateForumActivity"
			android:label="@string/create_forum_title"
			android:parentActivityName="org.briarproject.briar.android.navdrawer.NavDrawerActivity"
			android:windowSoftInputMode="adjustResize">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.navdrawer.NavDrawerActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.forum.ForumActivity"
			android:label="@string/app_name"
			android:parentActivityName="org.briarproject.briar.android.navdrawer.NavDrawerActivity"
			android:theme="@style/BriarTheme.NoActionBar"
			android:windowSoftInputMode="adjustResize|stateHidden">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.navdrawer.NavDrawerActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.sharing.ShareForumActivity"
			android:label="@string/activity_share_toolbar_header"
			android:parentActivityName="org.briarproject.briar.android.forum.ForumActivity"
			android:windowSoftInputMode="adjustResize|stateHidden">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.forum.ForumActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.sharing.ShareBlogActivity"
			android:label="@string/activity_share_toolbar_header"
			android:parentActivityName="org.briarproject.briar.android.blog.BlogActivity"
			android:windowSoftInputMode="adjustResize|stateHidden">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.blog.BlogActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.sharing.ForumSharingStatusActivity"
			android:label="@string/sharing_status"
			android:parentActivityName="org.briarproject.briar.android.forum.ForumActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.forum.ForumActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.sharing.BlogSharingStatusActivity"
			android:label="@string/sharing_status"
			android:parentActivityName="org.briarproject.briar.android.blog.BlogActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.blog.BlogActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.blog.BlogActivity"
			android:parentActivityName="org.briarproject.briar.android.navdrawer.NavDrawerActivity"
			android:theme="@style/BriarTheme.NoActionBar">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.navdrawer.NavDrawerActivity"/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.blog.WriteBlogPostActivity"
			android:label="@string/blogs_write_blog_post"
			android:parentActivityName="org.briarproject.briar.android.blog.BlogActivity"
			android:windowSoftInputMode="stateVisible|adjustResize">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.blog.BlogActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.blog.ReblogActivity"
			android:label="@string/blogs_reblog_button"
			android:parentActivityName="org.briarproject.briar.android.blog.BlogActivity"
			android:windowSoftInputMode="stateHidden">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.blog.BlogActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.blog.RssFeedImportActivity"
			android:label="@string/blogs_rss_feeds_import"
			android:parentActivityName="org.briarproject.briar.android.navdrawer.NavDrawerActivity"
			android:windowSoftInputMode="stateVisible|adjustResize">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.navdrawer.NavDrawerActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.blog.RssFeedManageActivity"
			android:label="@string/blogs_rss_feeds_manage"
			android:parentActivityName="org.briarproject.briar.android.navdrawer.NavDrawerActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.navdrawer.NavDrawerActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.keyagreement.KeyAgreementActivity"
			android:label="@string/add_contact_title"
			android:theme="@style/BriarTheme.NoActionBar"
			android:parentActivityName="org.briarproject.briar.android.navdrawer.NavDrawerActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.navdrawer.NavDrawerActivity"/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.introduction.IntroductionActivity"
			android:label="@string/introduction_activity_title"
			android:parentActivityName="org.briarproject.briar.android.contact.ConversationActivity"
			android:windowSoftInputMode="stateHidden|adjustResize">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.contact.ConversationActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.StartupFailureActivity"
			android:label="@string/startup_failed_activity_title">
		</activity>

		<activity
			android:name="org.briarproject.briar.android.settings.SettingsActivity"
			android:label="@string/settings_button"
			android:parentActivityName="org.briarproject.briar.android.navdrawer.NavDrawerActivity"
			android:permission="android.permission.READ_NETWORK_USAGE_HISTORY">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.navdrawer.NavDrawerActivity"
				/>
			<intent-filter>
				<action android:name="android.intent.action.MANAGE_NETWORK_USAGE"/>
				<category android:name="android.intent.category.DEFAULT"/>
			</intent-filter>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.login.ChangePasswordActivity"
			android:label="@string/change_password"
			android:parentActivityName="org.briarproject.briar.android.settings.SettingsActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.settings.SettingsActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.panic.PanicPreferencesActivity"
			android:label="@string/panic_setting"
			android:parentActivityName="org.briarproject.briar.android.settings.SettingsActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value="org.briarproject.briar.android.settings.SettingsActivity"
				/>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.panic.PanicResponderActivity"
			android:noHistory="true"
			android:theme="@android:style/Theme.NoDisplay">
			<!-- this can never have launchMode singleTask or singleInstance! -->
			<intent-filter>
				<action android:name="info.guardianproject.panic.action.TRIGGER"/>
				<category android:name="android.intent.category.DEFAULT"/>
			</intent-filter>
		</activity>

		<activity
			android:name="org.briarproject.briar.android.panic.ExitActivity"
			android:theme="@android:style/Theme.NoDisplay">
		</activity>

	</application>
</manifest>
