forked from jruesga/CMFileManager
-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
5 changed files
with
251 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/com/cyanogenmod/filemanager/preferences/DisplayRestrictions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.