Disable Move Actions for POP3 Folders
Bug: 11311812 Change-Id: I5813281cca76b9b4a373b5b40dbbd1909800f951
This commit is contained in:
parent
feacaf6351
commit
ae46818a19
@ -40,6 +40,7 @@
|
||||
<attr name="usesAutodiscover" format="boolean"/>
|
||||
<attr name="offerLookback" format="boolean"/>
|
||||
<attr name="offerLoadMore" format="boolean"/>
|
||||
<attr name="offerMoveTo" format="boolean"/>
|
||||
<attr name="defaultLookback">
|
||||
<enum name="auto" value="-2"/>
|
||||
<enum name="days1" value="1"/>
|
||||
|
@ -64,6 +64,7 @@
|
||||
email:offerLocalDeletes="true"
|
||||
email:inferPrefix="pop"
|
||||
email:offerLoadMore="true"
|
||||
email:offerMoveTo="false"
|
||||
/>
|
||||
<emailservice
|
||||
email:protocol="imap"
|
||||
@ -83,6 +84,7 @@
|
||||
email:syncChanges="true"
|
||||
email:inferPrefix="imap"
|
||||
email:offerLoadMore="true"
|
||||
email:offerMoveTo="true"
|
||||
/>
|
||||
<emailservice
|
||||
email:protocol="@string/protocol_eas"
|
||||
@ -105,5 +107,6 @@
|
||||
email:defaultLookback="auto"
|
||||
email:syncContacts="true"
|
||||
email:syncCalendar="true"
|
||||
email:offerMoveTo="true"
|
||||
/>
|
||||
</emailservices>
|
||||
|
@ -2832,7 +2832,7 @@ public class EmailProvider extends ContentProvider {
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
private static int getFolderCapabilities(EmailServiceInfo info, int type, long mailboxId) {
|
||||
private int getFolderCapabilities(EmailServiceInfo info, int type, long mailboxId) {
|
||||
// Special case for Search folders: only permit delete, do not try to give any other caps.
|
||||
if (type == Mailbox.TYPE_SEARCH) {
|
||||
return UIProvider.FolderCapabilities.DELETE;
|
||||
@ -2865,6 +2865,12 @@ public class EmailProvider extends ContentProvider {
|
||||
if (isVirtualMailbox(mailboxId)) {
|
||||
caps |= UIProvider.FolderCapabilities.IS_VIRTUAL;
|
||||
}
|
||||
|
||||
if (!info.offerMoveTo) {
|
||||
caps &= ~UIProvider.FolderCapabilities.CAN_ACCEPT_MOVED_MESSAGES &
|
||||
~UIProvider.FolderCapabilities.ALLOWS_REMOVE_CONVERSATION &
|
||||
~UIProvider.FolderCapabilities.ALLOWS_MOVE_TO_INBOX;
|
||||
}
|
||||
return caps;
|
||||
}
|
||||
|
||||
|
@ -201,6 +201,7 @@ public class EmailServiceUtils {
|
||||
public int defaultSyncInterval;
|
||||
public String inferPrefix;
|
||||
public boolean offerLoadMore;
|
||||
public boolean offerMoveTo;
|
||||
public boolean requiresSetup;
|
||||
public boolean hide;
|
||||
|
||||
@ -576,6 +577,8 @@ public class EmailServiceUtils {
|
||||
info.inferPrefix = ta.getString(R.styleable.EmailServiceInfo_inferPrefix);
|
||||
info.offerLoadMore =
|
||||
ta.getBoolean(R.styleable.EmailServiceInfo_offerLoadMore, false);
|
||||
info.offerMoveTo =
|
||||
ta.getBoolean(R.styleable.EmailServiceInfo_offerMoveTo, false);
|
||||
info.requiresSetup =
|
||||
ta.getBoolean(R.styleable.EmailServiceInfo_requiresSetup, false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user