diff options
author | Jorge Ruesga <jorge@ruesga.com> | 2012-11-17 01:56:01 +0100 |
---|---|---|
committer | Jorge Ruesga <jorge@ruesga.com> | 2012-12-11 22:06:02 +0100 |
commit | 0f3469ab6dd245913183484caed16df3bcb15893 (patch) | |
tree | 7e480a40d90b59481589f62f1fb8c5479174a705 /src/com/cyanogenmod/filemanager/preferences/DisplayRestrictions.java | |
parent | 8936a55df7403b336f0fae12ed1f2d0db2496a7a (diff) | |
download | android_packages_apps_CMFileManager-0f3469ab6dd245913183484caed16df3bcb15893.tar.gz android_packages_apps_CMFileManager-0f3469ab6dd245913183484caed16df3bcb15893.tar.bz2 android_packages_apps_CMFileManager-0f3469ab6dd245913183484caed16df3bcb15893.zip |
CMFileManager: AOSP GET_CONTENT_DATA compatibility
This change brings compatibility to GET_CONTENT_DATA for AOSP apps when
using the PickerActivity:
* Detect crop extra; use the com.android.camera.action.CROP action of Gallery3d
to crop and return the requested image. This gets compatilibity for example with
the contacts app, when a user try to set the image of a contact.
* Detect android.provider.MediaStore.Audio.Media.EXTRA_MAX_BYTES; when this extra
is present the PickerActivity only display (and allow select) files with a size lower
than requested.
* Detect Intent.EXTRA_LOCAL_ONLY; useless until CMFM allow access remote file systems.
Change-Id: I1020458505b236653e869ec1c1f532dd6d686633
Diffstat (limited to 'src/com/cyanogenmod/filemanager/preferences/DisplayRestrictions.java')
-rw-r--r-- | src/com/cyanogenmod/filemanager/preferences/DisplayRestrictions.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/com/cyanogenmod/filemanager/preferences/DisplayRestrictions.java b/src/com/cyanogenmod/filemanager/preferences/DisplayRestrictions.java new file mode 100644 index 00000000..2525ade4 --- /dev/null +++ b/src/com/cyanogenmod/filemanager/preferences/DisplayRestrictions.java @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2012 The CyanogenMod 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. + */ + +package com.cyanogenmod.filemanager.preferences; + +/** + * An enumeration of the restrictions that can be applied when displaying list of files. + */ +public enum DisplayRestrictions { + /** + * Restriction for display only files with the category. + */ + CATEGORY_TYPE_RESTRICTION, + /** + * Restriction for display only files with the mime/type. + */ + MIME_TYPE_RESTRICTION, + /** + * Restriction for display only files with a size lower than the specified + */ + SIZE_RESTRICTION, + /** + * Restriction for display only files from the local file system. Avoid remote files. + */ + LOCAL_FILESYSTEM_ONLY_RESTRICTION +} |