<!--
 ~ Copyright © 2021-2024 Harsh Shandilya.
 ~ Use of this source code is governed by an MIT-style
 ~ license that can be found in the LICENSE file or at
 ~ https://opensource.org/licenses/MIT.
 -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools">

  <uses-permission android:name="android.permission.INTERNET" />
  <application
    android:name=".ClawApplication"
    android:dataExtractionRules="@xml/data_extraction_rules"
    android:enableOnBackInvokedCallback="true"
    android:fullBackupContent="@xml/full_backup_content"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher"
    android:supportsRtl="true"
    android:theme="@style/Theme.Claw.SplashScreen"
    tools:targetApi="tiramisu">
    <profileable
      android:shell="true"
      tools:targetApi="29" />
    <activity
      android:name=".MainActivity"
      android:configChanges="colorMode|density|fontScale|keyboard|keyboardHidden|layoutDirection|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
      android:launchMode="singleTask"
      android:taskAffinity=""
      android:exported="true">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>

      <intent-filter>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data android:host="lobste.rs" />
        <data android:pathPattern="/s/......" />
        <data android:scheme="https" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data android:host="lobste.rs" />
        <data android:pathPattern="/s/....../" />
        <data android:scheme="https" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data android:host="lobste.rs" />
        <data android:pathPattern="/s/....../...*" />
        <data android:scheme="https" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data android:host="lobste.rs" />
        <data android:pathPattern="/s/......" />
        <data android:scheme="https" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data android:host="lobste.rs" />
        <data android:pathPattern="/s/....../" />
        <data android:scheme="https" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data android:host="lobste.rs" />
        <data android:pathPattern="/s/....../...*" />
        <data android:scheme="https" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data android:host="lobste.rs" />
        <data android:pathPattern="/s/......" />
        <data android:scheme="https" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data android:host="lobste.rs" />
        <data android:pathPattern="/s/....../" />
        <data android:scheme="https" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data android:host="lobste.rs" />
        <data android:pathPattern="/s/....../...*" />
        <data android:scheme="https" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data android:host="lobste.rs" />
        <data android:pathPattern="/u/......*" />
        <data android:scheme="https" />
      </intent-filter>
    </activity>
    <activity
      android:name=".SearchActivity"
      android:configChanges="colorMode|density|fontScale|keyboard|keyboardHidden|layoutDirection|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
      android:exported="true"
      android:label="Claw Search"
      android:launchMode="singleTask"
      android:taskAffinity=""
      android:theme="@style/Theme.Claw">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
      </intent-filter>
    </activity>

    <provider
      android:name="androidx.startup.InitializationProvider"
      android:authorities="${applicationId}.androidx-startup"
      android:exported="false"
      tools:node="merge">
      <meta-data
        android:name="androidx.work.WorkManagerInitializer"
        android:value="androidx.startup"
        tools:node="remove" />
      <meta-data
        android:name="com.deliveryhero.whetstone.worker.WhetstoneWorkerInitializer"
        android:value="androidx.startup"
        tools:node="remove" />
    </provider>
    <receiver
      android:name=".glance.WidgetReceiver"
      android:exported="true">
      <intent-filter>
        <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
      </intent-filter>
      <meta-data
        android:name="android.appwidget.provider"
        android:resource="@xml/saved_posts_widget_info" />
    </receiver>
    <!-- Required: set your sentry.io project identifier (DSN) -->
    <meta-data
      android:name="io.sentry.dsn"
      android:value="${sentryDsn}" />
    <!-- enable automatic breadcrumbs for user interactions (clicks, swipes, scrolls) -->
    <meta-data
      android:name="io.sentry.traces.user-interaction.enable"
      android:value="${enableSentry}" />
    <meta-data
      android:name="io.sentry.breadcrumbs.user-interaction"
      android:value="${enableSentry}" />
    <!-- enable screenshot for crashes -->
    <meta-data
      android:name="io.sentry.attach-screenshot"
      android:value="${enableSentry}" />
    <!-- enable view hierarchy for crashes -->
    <meta-data
      android:name="io.sentry.attach-view-hierarchy"
      android:value="${enableSentry}" />
  </application>
</manifest>
