summaryrefslogtreecommitdiffstats
path: root/AndroidManifest.xml
blob: c5b83b0c9a5ddb77135a65dfa61f0c8b5bf42f23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2012 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<!-- The format of the version code is vvMMDDc
     vv is major version number
     MM is the ordinal month number. This starts at 0 for each major release and
         counts up for each month
     DD is the day of the month
     c is a code which increments per version, in case we have multiple releases
          on the same date. This should start at zero. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.email"
    android:versionCode="7008110" >

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.VIBRATE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.MANAGE_ACCOUNTS"/>
    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
    <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"/>
    <uses-permission android:name="android.permission.READ_CONTACTS"/>
    <uses-permission android:name="android.permission.WRITE_CONTACTS"/>
    <uses-permission android:name="android.permission.READ_CALENDAR"/>
    <uses-permission android:name="android.permission.WRITE_CALENDAR"/>
    <uses-permission android:name="android.permission.READ_PROFILE"/>
    <uses-permission android:name="android.permission.NFC"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />

    <!-- This needs to be present when we are doing unbundled releases. -->
    <uses-sdk android:targetSdkVersion="21" android:minSdkVersion="14" />

    <!-- additional uses -->

    <original-package android:name="com.android.email" />

    <!-- Grant permission to other apps to view attachments -->
    <!-- STOPSHIP: protectionLevel should not be dangerous -->
    <permission
        android:name="com.android.email.permission.READ_ATTACHMENT"
        android:permissionGroup="android.permission-group.MESSAGES"
        android:protectionLevel="dangerous"
        android:label="@string/permission_read_attachment_label"
        android:description="@string/permission_read_attachment_desc"/>
    <uses-permission
        android:name="com.android.email.permission.READ_ATTACHMENT"/>

    <uses-permission
        android:name="android.permission.USE_CREDENTIALS"/>

    <!-- Grant permission to system apps to access provider (see provider below) -->
    <permission
        android:name="com.android.email.permission.ACCESS_PROVIDER"
        android:protectionLevel="signature"
        android:label="@string/permission_access_provider_label"
        android:description="@string/permission_access_provider_desc"/>
    <uses-permission
        android:name="com.android.email.permission.ACCESS_PROVIDER"/>

    <application
        android:name=".EmailApplication"
        android:icon="@mipmap/ic_launcher_mail"
        android:label="@string/app_name"
        android:requiredAccountType="com.android.exchange,com.android.email.imap,com.android.email.pop3,com.android.email.legacy.imap"
        android:theme="@style/UnifiedEmailTheme.Appcompat"
        android:hardwareAccelerated="true"
        android:allowBackup="false"
        android:supportsRtl="true"
        android:usesCleartextTraffic="true" >

        <uses-library android:name="org.apache.http.legacy" android:required="false" />
        <activity
            android:name="com.android.email.activity.ComposeActivityEmailExternal"
            android:label="@string/app_name"
            android:documentLaunchMode="intoExisting"
            android:autoRemoveFromRecents="true"
            android:theme="@style/ComposeTheme">
            <intent-filter>
                <action
                    android:name="android.intent.action.VIEW" />
                <action
                    android:name="android.intent.action.SENDTO" />
                <data
                    android:scheme="mailto" />
                <category
                    android:name="android.intent.category.DEFAULT" />
                <category
                    android:name="android.intent.category.BROWSABLE" />
            </intent-filter>
            <intent-filter
                android:label="@string/app_name">
                <action
                    android:name="android.intent.action.SEND" />
                <data
                    android:mimeType="*/*" />
                <category
                    android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter
                android:label="@string/app_name">
                <action
                    android:name="android.intent.action.SEND_MULTIPLE" />
                <data
                    android:mimeType="*/*" />
                <category
                    android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action
                    android:name="com.android.email.intent.action.REPLY" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SEND" />
                <category
                    android:name="android.intent.category.DEFAULT" />
                <data
                    android:scheme="content"
                    android:host="ui.email2.android.com"
                    android:pathPrefix="/compose"
                    />
            </intent-filter>
            <intent-filter>
                <action android:name="android.nfc.action.NDEF_DISCOVERED" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="mailto" />
            </intent-filter>

        </activity>

        <!--
            There are 2 ComposeActivityEmail activities (here and above) because one is listening
             for intents broadcasted internally and the other for those broadcasted from external
             applications. Refer to b/32068883.
        -->
        <activity android:name="com.android.email.activity.ComposeActivityEmail"
            android:exported="false"
            android:label="@string/app_name"
            android:documentLaunchMode="intoExisting"
            android:autoRemoveFromRecents="true"
            android:theme="@style/ComposeTheme">
            <intent-filter>
                <action android:name="com.android.mail.intent.action.LAUNCH_COMPOSE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>

            <intent-filter>
                <action android:name="com.android.mail.intent.action.LAUNCH_COMPOSE" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="content" />
            </intent-filter>
        </activity>

        <activity-alias android:name="com.android.mail.compose.ComposeActivity"
            android:targetActivity="com.android.email.activity.ComposeActivityEmail"/>

        <activity
            android:name=".activity.setup.OAuthAuthenticationActivity"
            android:label="@string/oauth_authentication_title">
        </activity>

        <activity
            android:name=".activity.setup.AccountCredentials"
            android:label="@string/sign_in_title"
            android:exported="false"
            android:excludeFromRecents="true"
            android:theme="@style/AccountSetupDialogActivityTheme">
        </activity>

        <activity
            android:name=".activity.EventViewer"
            android:label="@string/app_name"
            >
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category
                    android:name="android.intent.category.DEFAULT" />
                <data
                    android:scheme="content"
                    android:host="ui.email2.android.com"
                    android:pathPrefix="/event"
                    />
            </intent-filter>
        </activity>

        <activity android:name="com.android.mail.ui.FolderSelectionActivity"
            android:label="@string/activity_folder_selection"
            android:theme="@style/ShortcutWidgetTheme" />

        <activity android:name="com.android.email2.ui.MailboxSelectionActivityEmail"
            android:theme="@style/ShortcutWidgetTheme"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
            </intent-filter>
        </activity>

        <activity android:name="com.android.mail.ui.ShortcutNameActivity"
            android:label="@string/shortcut_name_title"
            android:theme="@style/ShortcutWidgetTheme">
        </activity>

        <activity android:name="com.android.mail.ui.MailboxSelectionActivity"
            android:theme="@style/ShortcutWidgetTheme"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
            </intent-filter>
        </activity>

        <activity android:name="com.android.email2.ui.CreateShortcutActivityEmail"
            android:theme="@style/ShortcutWidgetTheme"
            android:label="@string/folder_shortcut_widget_label">

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

        </activity>

        <activity
            android:label="@string/app_name"
            android:name="com.android.email2.ui.MailActivityEmail"
            android:theme="@style/MailActivityTheme"
            android:windowSoftInputMode="stateAlwaysHidden">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="content"/>
                <data android:mimeType="@string/application_mime_type" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <activity-alias android:name="com.android.email.activity.Welcome"
            android:targetActivity="com.android.email2.ui.MailActivityEmail"
            android:label="@string/app_name" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="android.intent.category.APP_EMAIL" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.LAUNCHER" />
                <data
                    android:scheme="content"
                    android:host="ui.email.android.com"
                    android:path="/view/mailbox"
                    />
            </intent-filter>
        </activity-alias>

        <!-- Must be exported in order for the AccountManager to launch it -->
        <!-- Also available for continuous test systems to force account creation -->
        <!-- TODO: fix this label -->
        <activity
            android:name=".activity.setup.AccountSetupFinal"
            android:label="@string/account_setup_basics_title"
            android:exported="true"
            >
            <intent-filter>
                <action android:name="com.android.email.FORCE_CREATE_ACCOUNT" />
                <action android:name="com.android.email.CREATE_NEW_ACCOUNT" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity
            android:name=".activity.setup.EmailPreferenceActivity"
            android:label="@string/activity_preferences"
            android:exported="false" >
            <intent-filter>
                <action android:name="android.intent.action.EDIT" />
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <data
                        android:scheme="content"
                        android:host="ui.email.android.com"
                        android:pathPrefix="/settings"
                        />
            </intent-filter>
        </activity>
        <activity
                android:name="com.android.mail.ui.settings.PublicPreferenceActivity"
                android:label="@string/activity_preferences"
                android:exported="true"
                android:theme="@android:style/Theme.NoDisplay" >
            <!-- Must be exported in order for the AccountManager to launch it -->
            <intent-filter>
                <action android:name="com.android.email.activity.setup.ACCOUNT_MANAGER_ENTRY" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.MANAGE_NETWORK_USAGE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity
            android:name=".activity.setup.AccountServerSettingsActivity"
            android:label="@string/mailbox_settings_activity_title"
            android:exported="false"
            android:excludeFromRecents="true"
            android:windowSoftInputMode="adjustResize"
            android:theme="@style/AccountSetupDialogActivityTheme" />
        <!-- a Headless Activity to load the account from the account id before navigating to the
        Incoming Account Settings fragment -->
        <activity
            android:name=".activity.setup.HeadlessAccountSettingsLoader"
            android:theme="@android:style/Theme.NoDisplay"
            >
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:host="com.android.email.ACCOUNT_SETTINGS" />
                <data android:scheme="auth"/>
            </intent-filter>
        </activity>
        <activity
            android:name=".provider.FolderPickerActivity"
            android:label="@string/app_name"
            >
            <intent-filter>
                <action android:name="android.intent.action.EDIT" />
                <category android:name="android.intent.category.DEFAULT" />
                <data
                    android:scheme="content"
                    android:host="ui.email.android.com"
                    android:pathPrefix="/setup"
                    />
            </intent-filter>
        </activity>
        <activity
            android:name=".activity.setup.AccountSecurity"
            android:label="@string/account_security_title"
            >
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:host="com.android.email.ACCOUNT_SECURITY" />
                <data android:scheme="auth"/>
            </intent-filter>
        </activity>

        <activity
            android:name=".activity.setup.MailboxSettings"
            android:label="@string/mailbox_settings_activity_title"
            android:exported="false" />

        <activity
            android:name="com.android.mail.photo.MailPhotoViewActivity"
            android:label="@string/app_name"
            android:theme="@style/MailPhotoViewTheme" >
        </activity>

        <activity
                android:name="com.android.mail.browse.EmlViewerActivity"
                android:label="@string/app_name"
                android:theme="@style/UnifiedEmailTheme.Appcompat" >
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="message/rfc822" />
                <data android:mimeType="application/eml" />
            </intent-filter>
        </activity>

        <activity
            android:name="com.android.mail.ui.HelpActivity"
            android:label="@string/help_and_info">
        </activity>

        <activity
            android:name="com.android.mail.ui.LicensesActivity"
            android:label="@string/open_source_licenses">
        </activity>

        <!-- additional activities -->

        <provider
            android:authorities="com.android.email.conversation.provider"
            android:label="@string/conversation_content_provider"
            android:exported="true"
            android:name="com.android.mail.browse.EmailConversationProvider" >
            <grant-uri-permission android:pathPattern=".*" />
        </provider>

        <provider
            android:authorities="com.android.email.accountcache"
            android:label="@string/account_cache_provider"
            android:exported="false"
            android:name="com.android.mail.providers.EmailAccountCacheProvider" >
            <grant-uri-permission android:pathPattern=".*" />
        </provider>

        <provider
                android:authorities="@string/eml_attachment_provider"
                android:exported="false"
                android:name="com.android.mail.providers.EmlAttachmentProvider" >
            <grant-uri-permission android:pathPattern=".*" />
        </provider>

        <service android:name="com.android.mail.compose.EmptyService"/>
        <!-- Widget -->
        <receiver android:name=".provider.WidgetProvider" android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.android.mail.ACTION_NOTIFY_DATASET_CHANGED" />
                <data android:mimeType="@string/application_mime_type" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.android.mail.ACTION_UPDATE_WIDGET" />
                <data android:mimeType="@string/application_mime_type" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.android.mail.ACTION_VALIDATE_ALL_WIDGETS" />
                <data android:mimeType="@string/application_mime_type" />
            </intent-filter>
            <meta-data android:name="android.appwidget.provider"
                       android:resource="@xml/widget_info" />
        </receiver>
        <service android:name="com.android.mail.widget.WidgetService"
                 android:permission="android.permission.BIND_REMOTEVIEWS"
                 android:exported="false" />

        <!-- From Email application -->

        <receiver
            android:name=".service.AttachmentService$AttachmentWatchdog"
            android:enabled="true"/>

        <!-- Handles app upgrade. This disables itself after running once. -->
        <receiver
            android:name=".service.EmailUpgradeBroadcastReceiver"
            android:enabled="true">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
            </intent-filter>
        </receiver>

        <receiver
            android:name=".service.EmailBroadcastReceiver"
            android:enabled="true"
            android:permission="com.android.email.permission.ACCESS_PROVIDER">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.DEVICE_STORAGE_LOW" />
                <action android:name="android.intent.action.DEVICE_STORAGE_OK" />
                <action android:name="android.intent.action.LOCALE_CHANGED"/>
                <action android:name="android.accounts.LOGIN_ACCOUNTS_CHANGED" />
                <action android:name="org.codeaurora.email.intent.action.MAIL_SERVICE_WAKEUP" />
                <action
                    android:name="org.codeaurora.email.intent.action.MAIL_SERVICE_DELETE_MESSAGE" />
                <action
                    android:name="org.codeaurora.email.intent.action.MAIL_SERVICE_MOVE_MESSAGE" />
                <action
                    android:name="org.codeaurora.email.intent.action.MAIL_SERVICE_MESSAGE_READ" />
                <action
                    android:name="org.codeaurora.email.intent.action.MAIL_SERVICE_SEND_PENDING" />
            </intent-filter>
            <!-- To handle new message notifications -->
            <intent-filter>
                <action android:name="com.android.mail.action.update_notification"
                        android:priority="-10" />
                <data android:mimeType="@string/application_mime_type" />
            </intent-filter>
            <!-- To handle secret code to activate the debug screen. -->
            <intent-filter>
                <action
                    android:name="android.provider.Telephony.SECRET_CODE" />
                <!-- "36245" = "email" -->
                <data
                    android:scheme="android_secret_code"
                    android:host="36245" />
            </intent-filter>
        </receiver>
        <service
            android:name=".service.EmailBroadcastProcessorService" />

        <!-- Support for DeviceAdmin / DevicePolicyManager.  See SecurityPolicy class for impl. -->
        <receiver
            android:name=".SecurityPolicy$PolicyAdmin"
            android:label="@string/device_admin_label"
            android:description="@string/device_admin_description"
            android:permission="android.permission.BIND_DEVICE_ADMIN" >
            <meta-data
                android:name="android.app.device_admin"
                android:resource="@xml/device_admin" />
            <intent-filter>
                <action
                    android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
            </intent-filter>
        </receiver>

        <service
            android:name=".service.AttachmentService"
            android:enabled="false"
            >
        </service>

        <!--Required stanza to register the PopImapAuthenticatorService with AccountManager -->
        <service
            android:name=".service.Pop3AuthenticatorService"
            android:exported="true"
            android:enabled="true"
            >
            <intent-filter>
                <action
                    android:name="android.accounts.AccountAuthenticator" />
            </intent-filter>
            <meta-data
                android:name="android.accounts.AccountAuthenticator"
                android:resource="@xml/authenticator_pop3"
                />
        </service>
        <!--Required stanza to register the PopImapAuthenticatorService with AccountManager -->
        <service
            android:name=".service.ImapAuthenticatorService"
            android:exported="true"
            android:enabled="false"
            >
            <intent-filter>
                <action
                    android:name="android.accounts.AccountAuthenticator" />
            </intent-filter>
            <meta-data
                android:name="android.accounts.AccountAuthenticator"
                android:resource="@xml/authenticator_imap"
                />
        </service>

        <!--Required stanza to register the PopImapSyncAdapterService with SyncManager -->
        <service
            android:name="com.android.email.service.Pop3SyncAdapterService"
            android:exported="true">
            <intent-filter>
                <action
                    android:name="android.content.SyncAdapter" />
            </intent-filter>
            <meta-data android:name="android.content.SyncAdapter"
                       android:resource="@xml/syncadapter_pop3" />
        </service>

        <service
            android:name="com.android.email.service.LegacyImapSyncAdapterService"
            android:exported="true">
            <intent-filter>
                <action
                    android:name="android.content.SyncAdapter" />
            </intent-filter>
            <meta-data android:name="android.content.SyncAdapter"
                       android:resource="@xml/syncadapter_legacy_imap" />
        </service>

        <!-- Require provider permission to use our Policy and Account services -->
        <service
            android:name=".service.PolicyService"
            android:enabled="true"
            android:permission="com.android.email.permission.ACCESS_PROVIDER"
            >
            <intent-filter>
                <action
                    android:name="com.android.email.POLICY_INTENT" />
            </intent-filter>
        </service>

        <service
            android:name=".service.AccountService"
            android:enabled="true"
            android:permission="com.android.email.permission.ACCESS_PROVIDER"
            >
            <intent-filter>
                <action
                    android:name="com.android.email.ACCOUNT_INTENT" />
            </intent-filter>
        </service>

        <service
            android:name=".service.ImapService"
            android:enabled="true"
            android:permission="com.android.email.permission.ACCESS_PROVIDER"
            >
            <intent-filter>
                <action
                    android:name="com.android.email.IMAP_INTENT" />
                <action
                    android:name="org.codeaurora.email.intent.action.MAIL_SERVICE_DELETE_MESSAGE" />
                <action
                    android:name="org.codeaurora.email.intent.action.MAIL_SERVICE_MOVE_MESSAGE" />
                <action
                    android:name="org.codeaurora.email.intent.action.MAIL_SERVICE_MESSAGE_READ" />
                <action
                    android:name="org.codeaurora.email.intent.action.MAIL_SERVICE_SEND_PENDING" />
            </intent-filter>
        </service>

        <service
            android:name=".service.Pop3Service"
            android:enabled="true"
            android:permission="com.android.email.permission.ACCESS_PROVIDER"
            >
            <intent-filter>
                <action
                    android:name="com.android.email.POP3_INTENT" />
            </intent-filter>
        </service>

        <!--Required stanza to register the EasAuthenticatorService with AccountManager -->
        <service
            android:name=".service.EasAuthenticatorService"
            android:exported="true"
            android:enabled="true"
            >
            <intent-filter>
                <action
                    android:name="android.accounts.AccountAuthenticator" />
            </intent-filter>
            <meta-data
                android:name="android.accounts.AccountAuthenticator"
                android:resource="@xml/authenticator_eas"
                />
        </service>
        <!--Required stanza to register the EasTestAuthenticatorService with AccountManager -->
        <service
            android:name=".service.EasTestAuthenticatorService"
            android:exported="true"
            android:enabled="false"
            >
            <intent-filter>
                <action
                    android:name="android.accounts.AccountAuthenticator" />
            </intent-filter>
            <meta-data
                android:name="android.accounts.AccountAuthenticator"
                android:resource="@xml/eastest_authenticator"
                />
        </service>
        <!--
            EasAuthenticatorService with the alternative label.  Disabled by default,
            and OneTimeInitializer enables it if the vendor policy tells so.
        -->
        <service
            android:name=".service.EasAuthenticatorServiceAlternate"
            android:exported="true"
            android:enabled="false"
            >
            <intent-filter>
                <action
                    android:name="android.accounts.AccountAuthenticator" />
            </intent-filter>
            <meta-data
                android:name="android.accounts.AccountAuthenticator"
                android:resource="@xml/authenticator_alternate"
                />
        </service>

        <service
            android:name=".service.LegacyImapAuthenticatorService"
            android:exported="false"
            android:enabled="true"
            >
            <intent-filter>
                <action
                    android:name="android.accounts.AccountAuthenticator" />
            </intent-filter>
            <meta-data
                android:name="android.accounts.AccountAuthenticator"
                android:resource="@xml/authenticator_legacy_imap"
                />
        </service>

        <provider
            android:name=".provider.AttachmentProvider"
            android:authorities="com.android.email.attachmentprovider"
            android:grantUriPermissions="true"
            android:exported="true"
            android:readPermission="com.android.email.permission.READ_ATTACHMENT"
            />

        <!-- This provider MUST be protected by strict permissions, as granting access to
             it exposes user passwords and other confidential information. -->
        <provider
            android:name=".provider.EmailProvider"
            android:authorities="com.android.email.provider;com.android.email.notifier"
            android:exported="true"
            android:permission="com.android.email.permission.ACCESS_PROVIDER"
            android:label="@string/app_name"
            android:grantUriPermissions="true">
            <grant-uri-permission android:pathPrefix="/attachment/cachedFile"/>
        </provider>

        <!-- Legacy authenticators, etc. can be added below. OEMs may remove these -->

        <service
            android:name=".service.LegacyEmailAuthenticatorService"
            android:exported="false"
            android:enabled="true"
            >
            <intent-filter>
                <action
                    android:name="android.accounts.AccountAuthenticator" />
            </intent-filter>
            <meta-data
                android:name="android.accounts.AccountAuthenticator"
                android:resource="@xml/authenticator_legacy_email"
                />
        </service>

        <service
            android:name=".service.LegacyEasAuthenticatorService"
            android:exported="false"
            android:enabled="true"
            >
            <intent-filter>
                <action
                    android:name="android.accounts.AccountAuthenticator" />
            </intent-filter>
            <meta-data
                android:name="android.accounts.AccountAuthenticator"
                android:resource="@xml/authenticator_legacy_eas"
                />
        </service>

        <service android:name="com.android.email.EmailIntentService"
                 android:exported="false">
            <intent-filter>
                <action android:name="com.android.mail.action.RESEND_NOTIFICATIONS" />
                <action android:name="com.android.mail.action.RESEND_NOTIFICATIONS_WEAR" />
                <action android:name="com.android.mail.action.SEND_SET_NEW_EMAIL_INDICATOR" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.android.mail.action.CLEAR_NEW_MAIL_NOTIFICATIONS" />
                <data android:scheme="content" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.android.mail.action.update_notification"
                        android:priority="-10"/>
                <data android:mimeType="@string/application_mime_type" />
            </intent-filter>
        </service>

        <service android:name="com.android.mail.NotificationActionIntentService"
                  android:exported="false">
            <intent-filter>
                <action android:name="com.android.mail.action.notification.MARK_READ" />
                <action android:name="com.android.mail.action.notification.ARCHIVE" />
                <action android:name="com.android.mail.action.notification.DELETE" />
                <action android:name="com.android.mail.action.notification.UNDO" />
                <action android:name="com.android.mail.action.notification.DESTRUCT" />
                <action android:name="com.android.mail.action.notification.UNDO_TIMEOUT" />
                <action android:name="com.android.mail.action.notification.REPLY" />
                <action android:name="com.android.mail.action.notification.REPLY_ALL" />
                <action android:name="com.android.mail.action.notification.FORWARD" />
                <data android:scheme="content" />
            </intent-filter>
        </service>
        <service android:name="com.android.mail.MailLogService">
        </service>
        <service android:name="com.android.mail.browse.EmlTempFileDeletionService" />
    </application>

    <!-- Legacy permissions, etc. can go here -->

</manifest>