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

    <uses-sdk tools:overrideLibrary="com.amulyakhare.textdrawable,com.astuetz.pagerslidingtabstrip,pl.tajchert.waitingdots,com.h6ah4i.android.multiselectlistpreferencecompat,android.support.v13,com.davemorrissey.labs.subscaleview,com.tomergoldst.tooltips,com.klinker.android.send_message,com.takisoft.colorpicker,android.support.v14.preference"/>

    <uses-feature android:name="android.hardware.camera" android:required="false" />
    <uses-feature android:name="android.hardware.bluetooth" android:required="false" />
    <uses-feature android:name="android.hardware.location" android:required="false"/>
    <uses-feature android:name="android.hardware.location.network" android:required="false"/>
    <uses-feature android:name="android.hardware.location.gps" android:required="false"/>
    <uses-feature android:name="android.hardware.microphone" android:required="false"/>
    <uses-feature android:name="android.hardware.wifi" android:required="false"/>
    <uses-feature android:name="android.hardware.portrait" android:required="false"/>
    <uses-feature android:name="android.hardware.touchscreen" android:required="false"/>

    <uses-permission android:name="android.permission.READ_CONTACTS"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.VIBRATE"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.INSTALL_SHORTCUT"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.SET_WALLPAPER"/>
    <uses-permission android:name="android.permission.RAISED_THREAD_PRIORITY" />

    <application android:name=".ApplicationContext"
                 android:icon="@mipmap/ic_launcher_dev"
                 android:label="@string/app_name"
                 android:supportsRtl="true"
                 tools:replace="android:allowBackup"
                 android:allowBackup="false"
                 android:theme="@style/TextSecure.LightTheme"
                 android:largeHeap="true"
                 tools:ignore="GoogleAppIndexingWarning">

    <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="AIzaSyCSx9xea86GwDKGznCAULE9Y5a8b-TfN9U"/>

    <meta-data android:name="com.google.android.gms.version"
               android:value="@integer/google_play_services_version" />

    <meta-data android:name="com.google.android.gms.car.application"
               android:resource="@xml/automotive_app_desc" />

    <activity android:name=".InviteActivity"
              android:theme="@style/TextSecure.HighlightTheme"
              android:windowSoftInputMode="stateHidden"
              android:parentActivityName=".ConversationListActivity"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize">
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="org.thoughtcrime.securesms.ConversationListActivity" />
    </activity>

    <activity android:name=".ShareActivity"
              android:theme="@style/TextSecure.LightNoActionBar"
              android:excludeFromRecents="true"
              android:launchMode="singleTask"
              android:taskAffinity=""
              android:noHistory="true"
              android:windowSoftInputMode="stateHidden"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize">

        <intent-filter>
            <action android:name="android.intent.action.SEND" />
            <category android:name="android.intent.category.DEFAULT"/>
            <data android:mimeType="audio/*" />
            <data android:mimeType="image/*" />
            <data android:mimeType="text/plain" />
            <data android:mimeType="video/*" />
            <data android:mimeType="application/*"/>
            <data android:mimeType="text/*"/>
            <data android:mimeType="*/*"/>
        </intent-filter>

        <meta-data
                android:name="android.service.chooser.chooser_target_service"
                android:value=".service.DirectShareService" />

    </activity>

    <activity android:name=".ConversationListActivity"
              android:label="@string/app_name"
              android:launchMode="singleTask"
              android:theme="@style/TextSecure.LightNoActionBar"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
              android:exported="true" />

    <activity-alias android:name=".RoutingActivity"
                    android:targetActivity=".ConversationListActivity"
                    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.MULTIWINDOW_LAUNCHER" />
        </intent-filter>

        <meta-data android:name="com.sec.minimode.icon.portrait.normal"
                   android:resource="@mipmap/ic_launcher" />
        <meta-data android:name="com.sec.minimode.icon.landscape.normal"
                   android:resource="@mipmap/ic_launcher" />

    </activity-alias>

    <activity android:name=".ConversationListArchiveActivity"
              android:label="@string/AndroidManifest_archived_conversations"
              android:launchMode="singleTask"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
              android:parentActivityName=".ConversationListActivity">
        <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="org.thoughtcrime.securesms.ConversationListActivity" />
    </activity>

    <activity android:name=".ConversationActivity"
              android:windowSoftInputMode="stateUnchanged"
              android:launchMode="singleTask"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
              android:parentActivityName=".ConversationListActivity">
        <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="org.thoughtcrime.securesms.ConversationListActivity" />
    </activity>

    <activity android:name=".ConversationPopupActivity"
              android:windowSoftInputMode="stateVisible"
              android:launchMode="singleTask"
              android:taskAffinity=""
              android:excludeFromRecents="true"
              android:theme="@style/TextSecure.LightTheme.Popup"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize" />

    <activity android:name=".GroupCreateActivity"
          android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>

    <activity android:name=".NewConversationActivity"
              android:theme="@style/TextSecure.LightNoActionBar"
              android:windowSoftInputMode="stateAlwaysVisible"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>

    <activity android:name=".ContactMultiSelectionActivity"
          android:label="@string/AndroidManifest__select_contacts"
          android:windowSoftInputMode="stateHidden"
          android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>

    <activity android:name=".ApplicationPreferencesActivity"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>

    <activity android:name=".WelcomeActivity"
              android:launchMode="singleTask"
              android:theme="@style/TextSecure.LightNoActionBar"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>

    <activity android:name=".RegistrationActivity"
              android:launchMode="singleTask"
              android:theme="@style/TextSecure.LightNoActionBar"
              android:windowSoftInputMode="stateUnchanged"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>

    <activity android:name=".LogViewActivity"
              android:label="@string/AndroidManifest__view_log"
              android:windowSoftInputMode="stateHidden"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>

    <activity android:name=".MediaPreviewActivity"
              android:label="@string/AndroidManifest__media_preview"
              android:windowSoftInputMode="stateHidden"
              android:launchMode="singleTask"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>

    <activity android:name=".MediaOverviewActivity"
              android:theme="@style/TextSecure.LightNoActionBar"
              android:windowSoftInputMode="stateHidden"
              android:launchMode="singleTask"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>

    <activity android:name=".DummyActivity"
              android:theme="@android:style/Theme.NoDisplay"
              android:enabled="true"
              android:allowTaskReparenting="true"
              android:noHistory="true"
              android:excludeFromRecents="true"
              android:alwaysRetainTaskState="false"
              android:stateNotNeeded="true"
              android:clearTaskOnLaunch="true"
              android:finishOnTaskLaunch="true" />

    <activity android:name=".RecipientPreferenceActivity"
              android:theme="@style/TextSecure.LightNoActionBar"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>

    <activity android:name=".BlockedAndShareContactsActivity"
              android:theme="@style/TextSecure.LightTheme"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>

    <activity android:name=".scribbles.ScribbleActivity"
              android:theme="@style/TextSecure.ScribbleTheme"
              android:windowSoftInputMode="stateHidden"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>

    <activity android:name=".scribbles.StickerSelectActivity"
              android:theme="@style/TextSecure.LightTheme"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>

    <activity android:name="com.soundcloud.android.crop.CropImageActivity" />

    <activity android:name=".CreateProfileActivity"
              android:theme="@style/TextSecure.LightTheme"
              android:windowSoftInputMode="stateVisible"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>

    <activity android:name=".QrScanActivity"
              android:theme="@style/TextSecure.LightTheme"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>

    <activity android:name=".QrShowActivity"
              android:theme="@style/TextSecure.LightTheme"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>

    <activity android:name=".ClearProfileAvatarActivity"
              android:theme="@style/Theme.AppCompat.Dialog.Alert"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
              android:icon="@drawable/clear_profile_avatar"
              android:label="@string/AndroidManifest_remove_photo">

        <intent-filter>
            <action android:name="org.thoughtcrime.securesms.action.CLEAR_PROFILE_PHOTO"/>
            <category android:name="android.intent.category.DEFAULT"/>
        </intent-filter>
    </activity>

    <activity android:name=".preferences.ChatBackgroundActivity"
              android:theme="@style/TextSecure.LightTheme"
              android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>

    <service android:name=".connect.KeepAliveService" android:enabled="true"/>

    <service android:name=".service.DirectShareService"
             android:permission="android.permission.BIND_CHOOSER_TARGET_SERVICE">
        <intent-filter>
            <action android:name="android.service.chooser.ChooserTargetService" />
        </intent-filter>
    </service>

    <receiver android:name=".connect.TimerReceiver" android:enabled="true"/>

    <receiver android:name=".notifications.MarkReadReceiver"
              android:enabled="true"
              android:exported="false">
        <intent-filter>
            <action android:name="org.thoughtcrime.securesms.notifications.CLEAR"/>
        </intent-filter>
    </receiver>

    <receiver android:name=".notifications.RemoteReplyReceiver"
              android:enabled="true"
              android:exported="false">
        <intent-filter>
            <action android:name="org.thoughtcrime.securesms.notifications.WEAR_REPLY"/>
        </intent-filter>
    </receiver>

    <receiver android:name=".notifications.AndroidAutoHeardReceiver"
              android:exported="false">
        <intent-filter>
          <action android:name="org.thoughtcrime.securesms.notifications.ANDROID_AUTO_HEARD"/>
        </intent-filter>
    </receiver>

    <receiver android:name=".notifications.AndroidAutoReplyReceiver"
              android:exported="false">
        <intent-filter>
          <action android:name="org.thoughtcrime.securesms.notifications.ANDROID_AUTO_REPLY"/>
        </intent-filter>
    </receiver>

    <provider android:name="android.support.v4.content.FileProvider"
              android:authorities="${applicationId}.fileprovider"
              android:exported="false"
              android:grantUriPermissions="true">

        <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_provider_paths" />

    </provider>

    <provider
        android:name=".connect.AttachmentsContentProvider"
        android:authorities="${applicationId}.attachments"
        android:grantUriPermissions="true"
        android:exported="false">
    </provider>

    <receiver android:name=".service.BootReceiver">
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED"/>
            <action android:name="org.thoughtcrime.securesms.RESTART"/>
        </intent-filter>
    </receiver>

    <receiver android:name=".notifications.MessageNotifier$ReminderReceiver">
        <intent-filter>
            <action android:name="org.thoughtcrime.securesms.MessageNotifier.REMINDER_ACTION"/>
        </intent-filter>
    </receiver>

    <receiver android:name=".notifications.DeleteNotificationReceiver">
        <intent-filter>
            <action android:name="org.thoughtcrime.securesms.DELETE_NOTIFICATION"/>
        </intent-filter>
    </receiver>

    <receiver
        android:name=".service.PanicResponderListener"
        android:exported="true">
        <intent-filter>
            <action android:name="info.guardianproject.panic.action.TRIGGER" />
        </intent-filter>
    </receiver>

    <uses-library android:name="com.sec.android.app.multiwindow" android:required="false"/>
    <meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
    <meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:value="632.0dip" />
    <meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:value="598.0dip" />
    <meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:value="632.0dip" />
    <meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:value="598.0dip" />

</application>
</manifest>
