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

    <!-- Разрешения для Android 9 -->
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

    <!-- Hardware features -->
    <uses-feature android:name="android.hardware.camera" android:required="true" />
    <uses-feature android:name="android.hardware.camera.autofocus" />
    <uses-feature android:name="android.hardware.microphone" android:required="true" />

    <application
        android:name=".GodEyeApplication"
        android:allowBackup="true"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.GodEye"
        android:networkSecurityConfig="@xml/network_security_config"
        android:usesCleartextTraffic="true"
        tools:targetApi="28">

        <!-- ТОЛЬКО LegacyMainActivity как точка входа -->
        <activity
            android:name=".LegacyMainActivity"
            android:exported="true"
            android:theme="@style/Theme.GodEye"
            android:screenOrientation="portrait"
            android:launchMode="singleTop">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <!-- LegacyCameraActivity -->
        <activity
            android:name=".LegacyCameraActivity"
            android:exported="false"
            android:theme="@style/Theme.GodEye"
            android:screenOrientation="portrait"
            android:launchMode="singleTop" />

        <!-- SocketService для legacy -->
        <service
            android:name=".services.SocketService"
            android:enabled="true"
            android:exported="false" />

    </application>

</manifest>
