mobile/android/base/AndroidManifest.xml.in
author Tiberius Oros <toros@mozilla.com>
Thu, 10 May 2018 18:11:55 +0300
changeset 417754 3e7ffd532e0ac7d7fc52a52f80a2e1b839a7f915
parent 417746 64cccb490a2a93cf744421cf37c485415df44798
child 417863 3ac2124bfed000ea96d0134a08c3852a8e6f452e
permissions -rw-r--r--
Backed out 6 changesets (bug 1433968) for Android failures on GeckoRuntimeSettings on a CLOSED TREE Backed out changeset bba1deb626b5 (bug 1433968) Backed out changeset 7a8616427aea (bug 1433968) Backed out changeset c94c48d76350 (bug 1433968) Backed out changeset 64cccb490a2a (bug 1433968) Backed out changeset 62f865eed952 (bug 1433968) Backed out changeset 5ed1e3af37ba (bug 1433968)

#filter substitution
<?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="@ANDROID_PACKAGE_NAME@"
      android:installLocation="internalOnly"
      android:versionCode="@ANDROID_VERSION_CODE@"
      android:versionName="@MOZ_APP_VERSION@"
#ifdef MOZ_ANDROID_SHARED_ID
      android:sharedUserId="@MOZ_ANDROID_SHARED_ID@"
#endif
      >
    <uses-sdk android:minSdkVersion="@MOZ_ANDROID_MIN_SDK_VERSION@"
#ifdef MOZ_ANDROID_MAX_SDK_VERSION
              android:maxSdkVersion="@MOZ_ANDROID_MAX_SDK_VERSION@"
#endif
              android:targetSdkVersion="@ANDROID_TARGET_SDK@"/>


<!--
    The separated permission file is for bouncer.apk. Since it's removed,
     we can merge the permission declaration back. See Bug 1411809.
 -->
#include FennecManifest_permissions.xml.in

    <application android:label="@string/moz_app_displayname"
                 android:icon="@drawable/icon"
                 android:logo="@drawable/logo"
                 android:name="@MOZ_ANDROID_APPLICATION_CLASS@"
                 android:hardwareAccelerated="true"
                 android:supportsRtl="true"
                 android:allowBackup="false"
                 >

        <meta-data android:name="com.sec.android.support.multiwindow" android:value="true"/>

        <meta-data android:name="android.max_aspect" android:value="2.1"/>

#ifdef MOZ_NATIVE_DEVICES
        <service android:name="org.mozilla.gecko.RemotePresentationService" android:exported="false"/>
#endif

        <!-- This activity handles all incoming Intents and dispatches them to other activities. -->
        <activity android:name="org.mozilla.gecko.LauncherActivity"
            android:theme="@android:style/Theme.Translucent.NoTitleBar"
            android:relinquishTaskIdentity="true"
            android:taskAffinity=""
            android:exported="true"
            android:excludeFromRecents="true" />

        <!-- Fennec is shipped as the Android package named
             org.mozilla.{fennec,firefox,firefox_beta}.  The internal Java
             package hierarchy inside the Android package used to have an
             org.mozilla.{fennec,firefox,firefox_beta} subtree *and* an
             org.mozilla.gecko subtree; it now only has org.mozilla.gecko. -->
        <activity android:name="@MOZ_ANDROID_BROWSER_INTENT_CLASS@"
                  android:label="@string/moz_app_displayname"
                  android:taskAffinity="@ANDROID_PACKAGE_NAME@.BROWSER"
                  android:alwaysRetainTaskState="true"
                  android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize|locale|layoutDirection|smallestScreenSize|screenLayout"
                  android:windowSoftInputMode="stateUnspecified|adjustResize"
                  android:launchMode="singleTask"
                  android:exported="true"
                  android:theme="@style/Gecko.App" />

        <!-- Bug 1256615 / Bug 1268455: We published an .App alias and we need to maintain it
             forever.  If we don't, home screen shortcuts will disappear because the intent
             filter details change. -->
        <activity-alias android:name=".App"
                        android:label="@MOZ_APP_DISPLAYNAME@"
                        android:targetActivity="org.mozilla.gecko.LauncherActivity">

            <!-- android:priority ranges between -1000 and 1000.  We never want
                 another activity to usurp the MAIN action, so we ratchet our
                 priority up. -->
            <intent-filter android:priority="999">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="android.intent.category.MULTIWINDOW_LAUNCHER"/>
                <category android:name="android.intent.category.APP_BROWSER" />
                <category android:name="android.intent.category.DEFAULT" />
            </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:scheme="http" />
                <data android:scheme="https" />
                <data android:scheme="about" />
                <data android:scheme="javascript" />
                <data android:scheme="firefox" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="file" />
                <data android:scheme="http" />
                <data android:scheme="https" />
                <data android:mimeType="text/html"/>
                <data android:mimeType="text/plain"/>
                <data android:mimeType="application/xhtml+xml"/>
                <data android:mimeType="image/svg+xml"/>
            </intent-filter>

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

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

            <intent-filter>
                <action android:name="org.mozilla.gecko.ACTION_ALERT_CALLBACK" />
            </intent-filter>

            <intent-filter>
                <action android:name="org.mozilla.gecko.GUEST_SESSION_INPROGRESS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>

            <intent-filter>
                <action android:name="org.mozilla.gecko.UPDATE"/>
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>

            <intent-filter tools:ignore="AppLinkUrlError">
                <action android:name="android.intent.action.WEB_SEARCH" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="" />
                <data android:scheme="http" />
                <data android:scheme="https" />
            </intent-filter>

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

            <!-- Pre Lollipop devices display a generic search icon, if none is
                 provided here. To use this we need to set the resource to 0.
                 For Lollipop and later the search launcher icon ist used.
                 To retrieve the resource value the Bundle.getInt() method is
                 used, so we use integer resources instead of drawables, because
                 setting a drawable referenced to 0 results in errors when used
                 as a real drawable resource somewhere else. -->
            <meta-data
                android:name="com.android.systemui.action_assist_icon"
                android:resource="@integer/assist_launch_icon_res"/>

            <!-- For XPI installs from websites and the download manager. -->
            <intent-filter tools:ignore="AppLinkUrlError">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="file" />
                <data android:scheme="http" />
                <data android:scheme="https" />
                <data android:mimeType="application/x-xpinstall" />
            </intent-filter>

            <!-- For XPI installs from file: URLs. -->
            <intent-filter tools:ignore="AppLinkUrlError">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:host="" />
                <data android:scheme="file" />
                <data android:pathPattern=".*\\.xpi" />
            </intent-filter>

#ifdef MOZ_ANDROID_BEAM
            <intent-filter>
                <action android:name="android.nfc.action.NDEF_DISCOVERED"/>
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="http" />
                <data android:scheme="https" />
            </intent-filter>
#endif

            <!-- For debugging -->
            <intent-filter>
                <action android:name="org.mozilla.gecko.DEBUG" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity-alias>

        <service android:name="org.mozilla.gecko.GeckoService" />

        <activity android:name="org.mozilla.gecko.trackingprotection.TrackingProtectionPrompt"
                  android:launchMode="singleTop"
                  android:theme="@style/OverlayActivity" />

        <activity android:name="org.mozilla.gecko.promotion.SimpleHelperUI"
                  android:launchMode="singleTop"
                  android:theme="@style/OverlayActivity" />

        <activity android:name="org.mozilla.gecko.promotion.HomeScreenPrompt"
                  android:launchMode="singleTop"
                  android:theme="@style/OverlayActivity" />

        <!-- The main reason for the Tab Queue build flag is to not mess with the VIEW intent filter
             before the rest of the plumbing is in place -->

        <service android:name="org.mozilla.gecko.tabqueue.TabQueueService" />

        <activity android:name="org.mozilla.gecko.tabqueue.TabQueuePrompt"
                  android:launchMode="singleTop"
                  android:theme="@style/OverlayActivity" />

        <receiver android:name="org.mozilla.gecko.restrictions.RestrictionProvider">
          <intent-filter>
            <action android:name="android.intent.action.GET_RESTRICTION_ENTRIES" />
          </intent-filter>
        </receiver>

        <!-- Masquerade as the Resolver so that we can be opened from the Marketplace. -->
        <activity-alias
            android:name="com.android.internal.app.ResolverActivity"
            android:targetActivity="@MOZ_ANDROID_BROWSER_INTENT_CLASS@"
            android:exported="true" />

        <receiver android:name="org.mozilla.gecko.GeckoUpdateReceiver">
            <intent-filter>
                <action android:name="@ANDROID_PACKAGE_NAME@.CHECK_UPDATE_RESULT" />
            </intent-filter>
        </receiver>

        <receiver android:name="org.mozilla.gecko.GeckoMessageReceiver"
                  android:exported="false">
        </receiver>

        <!-- Catch install referrer so we can do post-install work. -->
        <receiver android:name="org.mozilla.gecko.distribution.ReferrerReceiver"
                  android:exported="true">
            <intent-filter>
                <action android:name="com.android.vending.INSTALL_REFERRER" />
            </intent-filter>
        </receiver>

        <service android:name="org.mozilla.gecko.Restarter"
                 android:exported="false"
                 android:process="@MANGLED_ANDROID_PACKAGE_NAME@.Restarter">
        </service>

        <service android:name="org.mozilla.gecko.media.MediaControlService"
                 android:exported="false"
                 android:stopWithTask="true">
        </service>

        <receiver
            android:name="org.mozilla.gecko.notifications.WhatsNewReceiver"
            android:exported="false">
            <intent-filter>
                <action android:name="android.intent.action.PACKAGE_REPLACED" />
                <data android:scheme="package" android:path="org.mozilla.gecko" />
            </intent-filter>
        </receiver>

        <receiver
            android:name="org.mozilla.gecko.notifications.NotificationReceiver"
            android:exported="false">
            <!-- Notification API V2 -->
            <intent-filter>
                <action android:name="@ANDROID_PACKAGE_NAME@.helperBroadcastAction" />
                <action android:name="@ANDROID_PACKAGE_NAME@.NOTIFICATION_CLICK" />
                <action android:name="@ANDROID_PACKAGE_NAME@.NOTIFICATION_CLOSE" />
                <data android:scheme="moz-notification" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </receiver>

#include ../services/manifests/FxAccountAndroidManifest_activities.xml.in

#ifdef MOZ_CRASHREPORTER
  <activity android:name="org.mozilla.gecko.CrashReporter"
            android:process="@ANDROID_PACKAGE_NAME@.CrashReporter"
            android:label="@string/crash_reporter_title"
            android:icon="@drawable/crash_reporter"
            android:theme="@style/Gecko"
            android:exported="false"
            android:excludeFromRecents="true">
          <intent-filter>
            <action android:name="org.mozilla.gecko.reportCrash" />
          </intent-filter>
  </activity>
#endif

        <activity android:name="org.mozilla.gecko.preferences.GeckoPreferences"
                  android:theme="@style/Gecko.Preferences"
                  android:configChanges="orientation|screenSize|locale|layoutDirection"
                  android:excludeFromRecents="true"/>

        <provider android:name="org.mozilla.gecko.db.BrowserProvider"
                  android:authorities="@ANDROID_PACKAGE_NAME@.db.browser"
                  android:exported="false"/>

        <provider android:name="org.mozilla.gecko.distribution.PartnerBookmarksProviderProxy"
                  android:authorities="@ANDROID_PACKAGE_NAME@.partnerbookmarks"
                  android:exported="false"/>

        <!-- Share overlay activity

             Setting launchMode="singleTop" ensures onNewIntent is called when the Activity is
             reused. Ideally we create a new instance but Android L breaks this (bug 1137928). -->
        <activity android:name="org.mozilla.gecko.overlays.ui.ShareDialog"
                  android:label="@string/overlay_share_label"
                  android:theme="@style/OverlayActivity"
                  android:configChanges="keyboard|keyboardHidden|mcc|mnc|locale|layoutDirection"
                  android:launchMode="singleTop"
                  android:windowSoftInputMode="stateAlwaysHidden|adjustResize">

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

        </activity>

        <activity android:name="org.mozilla.gecko.customtabs.CustomTabsActivity"
                  android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize|locale|layoutDirection|smallestScreenSize|screenLayout"
                  android:windowSoftInputMode="stateUnspecified|adjustResize"
                  android:theme="@style/GeckoCustomTabs" />

        <activity android:name="org.mozilla.gecko.webapps.WebAppActivity"
            android:theme="@style/Theme.AppCompat.NoActionBar" />

        <!-- Declare a predefined number of WebApp<num> activities. These are
             used so that each web app can launch in its own activity. -->
#define FRAGMENT WebAppManifestFragment.xml.frag.in
#include WebAppFragmentRepeater.inc


        <!-- Service to handle requests from overlays. -->
        <service android:name="org.mozilla.gecko.overlays.service.OverlayActionService" />

        <!--
          Ensure that passwords provider runs in its own process. (Bug 718760.)
          Process name is per-application to avoid loading CPs from multiple
          Fennec versions into the same process. (Bug 749727.)
          Process name is a mangled version to avoid a Talos bug. (Bug 750548.)
          -->
        <provider android:name="org.mozilla.gecko.db.PasswordsProvider"
                  android:label="@string/sync_configure_engines_title_passwords"
                  android:authorities="@ANDROID_PACKAGE_NAME@.db.passwords"
                  android:exported="false"
                  android:process="@MANGLED_ANDROID_PACKAGE_NAME@.PasswordsProvider"/>

        <provider android:name="org.mozilla.gecko.db.LoginsProvider"
                  android:label="@string/sync_configure_engines_title_passwords"
                  android:authorities="@ANDROID_PACKAGE_NAME@.db.logins"
                  android:exported="false"/>

        <provider android:name="org.mozilla.gecko.db.FormHistoryProvider"
                  android:label="@string/sync_configure_engines_title_history"
                  android:authorities="@ANDROID_PACKAGE_NAME@.db.formhistory"
                  android:exported="false"/>

        <provider android:name="org.mozilla.gecko.GeckoProfilesProvider"
                  android:authorities="@ANDROID_PACKAGE_NAME@.profiles"
                  android:exported="false"/>

        <provider android:name="org.mozilla.gecko.db.TabsProvider"
                  android:label="@string/sync_configure_engines_title_tabs"
                  android:authorities="@ANDROID_PACKAGE_NAME@.db.tabs"
                  android:exported="false"/>

        <provider android:name="org.mozilla.gecko.db.HomeProvider"
                  android:authorities="@ANDROID_PACKAGE_NAME@.db.home"
                  android:exported="false"/>

        <provider android:name="org.mozilla.gecko.db.SearchHistoryProvider"
                  android:authorities="@ANDROID_PACKAGE_NAME@.db.searchhistory"
                  android:exported="false"/>

        <service
            android:exported="false"
            android:name="org.mozilla.gecko.updater.UpdateService"
            android:process="@MANGLED_ANDROID_PACKAGE_NAME@.UpdateService">
        </service>

        <service
            android:exported="false"
            android:name="org.mozilla.gecko.notifications.NotificationService">
        </service>

        <service
            android:exported="false"
            android:name="org.mozilla.gecko.dlc.DownloadContentService">
        </service>

        <!-- DON'T EXPORT THIS, please! An attacker could delete arbitrary files. -->
        <service
            android:exported="false"
            android:name="org.mozilla.gecko.cleanup.FileCleanupService">
        </service>

        <receiver
            android:name="org.mozilla.gecko.mma.PackageAddedReceiver"
            android:exported="false">
            <intent-filter>
                 <action android:name="android.intent.action.PACKAGE_ADDED"/>
                 <data android:scheme="package"/>
            </intent-filter>
        </receiver>

        <receiver
            android:name="org.mozilla.gecko.PackageReplacedReceiver"
            android:exported="false">
            <intent-filter>
                <action android:name="android.intent.action.MY_PACKAGE_REPLACED"></action>
            </intent-filter>
        </receiver>

        <service
          android:name="org.mozilla.gecko.telemetry.TelemetryUploadService"
          android:exported="false"/>

        <service
            android:name="org.mozilla.gecko.customtabs.GeckoCustomTabsService"
            android:exported="true">
            <intent-filter>
                <action android:name="android.support.customtabs.action.CustomTabsService" />
            </intent-filter>
        </service>

#include ../services/manifests/FxAccountAndroidManifest_services.xml.in

        <service
            android:name="org.mozilla.gecko.tabqueue.TabReceivedService"
            android:exported="false" />


#ifdef MOZ_ANDROID_MLS_STUMBLER
#include ../stumbler/manifests/StumblerManifest_services.xml.in
#endif

#ifdef MOZ_ANDROID_GCM
#include GcmAndroidManifest_services.xml.in
#endif

        <service
            android:name="org.mozilla.gecko.media.MediaManager"
            android:enabled="true"
            android:exported="false"
            android:process=":media"
            android:isolatedProcess="false">
        </service>

        <!-- New child services must also be added to the GeckoView AndroidManifest.xml -->
        <service
            android:name="org.mozilla.gecko.process.GeckoServiceChildProcess$geckomediaplugin"
            android:enabled="true"
            android:exported="false"
            android:process=":geckomediaplugin"
            android:isolatedProcess="false">
        </service>

        <service
            android:name="org.mozilla.gecko.process.GeckoServiceChildProcess$tab"
            android:enabled="true"
            android:exported="false"
            android:process=":tab"
            android:isolatedProcess="false">
        </service>

        <service
            android:name="org.mozilla.gecko.gfx.SurfaceAllocatorService"
            android:enabled="true"
            android:exported="false"
            android:isolatedProcess="false">
        </service>

#ifdef MOZ_ANDROID_MMA
#include MmaAndroidManifest_services.xml.in
#endif

#ifdef MOZ_ANDROID_GOOGLE_PLAY_SERVICES
        <!-- This resources comes from Google Play Services. Required for casting support. -->
        <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
#endif

    </application>
</manifest>