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

	<uses-sdk
		android:minSdkVersion="14"
		android:targetSdkVersion="22"
		tools:overrideLibrary="android.support.v14.preference"
		/>

	<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" />
	<!-- Since API 23, this is needed to add contacts via Bluetooth -->
	<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

	<application
		android:name=".android.BriarApplicationImpl"
		android:allowBackup="false"
		android:icon="@drawable/ic_launcher"
		android:label="@string/app_name"
		android:logo="@drawable/logo"
		android:theme="@style/BriarTheme">

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

		<activity
			android:name=".android.report.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/BriarThemeNoActionBar.Default"
			android:windowSoftInputMode="stateHidden">
		</activity>

		<activity
			android:name=".android.ExpiredActivity"
			android:label="@string/app_name">
		</activity>

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

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

		<activity
			android:name=".android.SplashScreenActivity"
			android:theme="@style/BriarThemeNoActionBar.Default"
			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=".android.NavDrawerActivity"
			android:theme="@style/BriarThemeNoActionBar.Default"
		    android:launchMode="singleTop">
		</activity>

		<activity
			android:name=".android.contact.ConversationActivity"
			android:label="@string/app_name"
			android:theme="@style/BriarThemeNoActionBar.Default"
			android:parentActivityName=".android.NavDrawerActivity"
			android:windowSoftInputMode="stateHidden">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value=".android.NavDrawerActivity"
				/>
		</activity>

		<activity
			android:name=".android.sharing.InvitationsForumActivity"
			android:label="@string/forum_invitations_title"
			android:parentActivityName=".android.NavDrawerActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value=".android.NavDrawerActivity"
				/>
		</activity>

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

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

		<activity
			android:name=".android.forum.ForumActivity"
			android:label="@string/app_name"
			android:parentActivityName=".android.NavDrawerActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value=".android.NavDrawerActivity"
				/>
		</activity>

		<activity
			android:name=".android.sharing.ShareForumActivity"
			android:label="@string/activity_share_toolbar_header"
			android:parentActivityName=".android.forum.ForumActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value=".android.forum.ForumActivity"
				/>
		</activity>

		<activity
			android:name=".android.sharing.ShareBlogActivity"
			android:label="@string/activity_share_toolbar_header"
			android:parentActivityName=".android.blogs.BlogActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value=".android.blogs.BlogActivity"
				/>
		</activity>

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

		<activity
			android:name=".android.sharing.SharingStatusBlogActivity"
			android:label="@string/sharing_status"
			android:parentActivityName=".android.blogs.BlogActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value=".android.blogs.BlogActivity"
				/>
		</activity>

		<activity
			android:name=".android.blogs.CreateBlogActivity"
			android:label="@string/blogs_my_blogs_label"
			android:parentActivityName=".android.NavDrawerActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value=".android.NavDrawerActivity"
				/>
		</activity>

		<activity
			android:name=".android.blogs.BlogActivity"
			android:parentActivityName=".android.NavDrawerActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value=".android.NavDrawerActivity"
				/>
		</activity>

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

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

		<activity
			android:name=".android.blogs.RssFeedManageActivity"
			android:label="@string/blogs_rss_feeds_manage"
			android:parentActivityName=".android.NavDrawerActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value=".android.NavDrawerActivity"
				/>
		</activity>

		<activity
			android:name=".android.identity.CreateIdentityActivity"
			android:label="@string/new_identity_title"
			android:windowSoftInputMode="stateVisible">
		</activity>

		<activity
			android:name=".android.invitation.AddContactActivity"
			android:label="@string/add_contact_title"
			android:parentActivityName=".android.NavDrawerActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value=".android.NavDrawerActivity"
				/>
		</activity>

		<activity
			android:name=".android.keyagreement.KeyAgreementActivity"
			android:label="@string/add_contact_title"
			android:theme="@style/BriarThemeNoActionBar.Default"
			android:parentActivityName=".android.NavDrawerActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value=".android.NavDrawerActivity"/>
		</activity>

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

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

		<activity
			android:name=".android.SettingsActivity"
			android:label="@string/settings_button"
			android:parentActivityName=".android.NavDrawerActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value=".android.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=".android.ChangePasswordActivity"
			android:label="@string/change_password"
			android:parentActivityName=".android.SettingsActivity">
			<meta-data
				android:name="android.support.PARENT_ACTIVITY"
				android:value=".android.SettingsActivity"
				/>
		</activity>

		<activity
			android:name=".android.panic.PanicPreferencesActivity"
			android:label="@string/panic_setting">
			<intent-filter>
				<action android:name="info.guardianproject.panic.action.CONNECT"/>
				<action android:name="info.guardianproject.panic.action.DISCONNECT"/>

				<category android:name="android.intent.category.DEFAULT"/>
			</intent-filter>
		</activity>

		<activity
			android:name=".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=".android.panic.ExitActivity"
			android:theme="@android:style/Theme.NoDisplay">
		</activity>

	</application>
</manifest>
