Allow deletion from virtual folders.

Bug: 10367404
Change-Id: I869dfc5af7064e2992bbd47c89fd990e2caaa701
This commit is contained in:
Yu Ping Hu 2013-08-16 18:30:44 -07:00
parent 908fac0b24
commit 901faf1bfb

View File

@ -33,11 +33,11 @@ import android.content.res.Resources;
import android.database.ContentObserver; import android.database.ContentObserver;
import android.database.Cursor; import android.database.Cursor;
import android.database.CursorWrapper; import android.database.CursorWrapper;
import android.database.DatabaseUtils;
import android.database.MatrixCursor; import android.database.MatrixCursor;
import android.database.MergeCursor; import android.database.MergeCursor;
import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException; import android.database.sqlite.SQLiteException;
import android.database.DatabaseUtils;
import android.net.Uri; import android.net.Uri;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Binder; import android.os.Binder;
@ -112,7 +112,6 @@ import java.io.FileNotFoundException;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
@ -2880,7 +2879,8 @@ public class EmailProvider extends ContentProvider {
getFolderTypeFromMailboxType(mailboxType), ""); getFolderTypeFromMailboxType(mailboxType), "");
// default empty string since all of these should use resource strings // default empty string since all of these should use resource strings
values[UIProvider.FOLDER_HAS_CHILDREN_COLUMN] = 0; values[UIProvider.FOLDER_HAS_CHILDREN_COLUMN] = 0;
values[UIProvider.FOLDER_CAPABILITIES_COLUMN] = UIProvider.FolderCapabilities.IS_VIRTUAL; values[UIProvider.FOLDER_CAPABILITIES_COLUMN] =
UIProvider.FolderCapabilities.DELETE | UIProvider.FolderCapabilities.IS_VIRTUAL;
values[UIProvider.FOLDER_CONVERSATION_LIST_URI_COLUMN] = combinedUriString("uimessages", values[UIProvider.FOLDER_CONVERSATION_LIST_URI_COLUMN] = combinedUriString("uimessages",
idString); idString);