MediaProvider: MediaScanner behavior on boot (2/3)

Lets you enable/disable/ask (with a notification) media scanning on boot.
Can speed up boot and reduce initial boot lag from MediaScanner

- added xxhdpi icon
- no need for multiuser due that this should be a one time set
  general option set by the owner of the device

Change-Id: Iad0b72f8b653b3d567b27de3ccf5c6cfb07e40ed
MediaProvider: Allow scan for directories

Patchset 2: Allow only directories of external volumes

Change-Id: I5694f75896749d84b163a1213730eaa4c1e776e6
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Merge tag 'android-4.4.1_r1' into HEAD

Android 4.4.1 Release 1
MediaProvider: google please cleanup your translations....MediaProvider cleanup

it is really at the moment a nightmare to see compile errors when
getting 100000 of warnings. Whatever we removed already on some
packages the warnings....but still a lot are there

Change-Id: I8f25954c240300d74cf8acdd8f3e86b62c4928af
Allow holders of WRITE_MEDIA_STORAGE to write to secondary external storage

Apps with WRITE_MEDIA_STORAGE can write to the secondary
external storage directly so there is no need to prevent
that through the MediaProvider.

Change-Id: If092fcdf0b90599afdb52a8e6ae4c7ba1090acc4
Revert "Allow holders of WRITE_MEDIA_STORAGE to write to secondary external storage"

This reverts commit b4171e508d37622774363d90bef16d76386eb44a.

Change-Id: I24bdb75c248f5ff465e77979cb7e6505dd721594
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
MediaProvider: allow write access to external SD

Without this, Gallery cannot delete photos on external SD.

Change-Id: Ifbebcdb167cca92a5a05158fa4c8b81512b77ba6
Merge tag 'android-4.4.3_r1.1' into HEAD

Android 4.4.3 release 1.1
Theme Engine [7/8]

MediaProvider: Add theme support to Ringtone activity

++ PA Warning: we don't have profiles, adapted. ++

Usage:

Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_ALARM);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_DIALOG_THEME, R.style.CustomDialogTheme); <<< Add your custom dialog theme here
startActivityForResult(intent, 0);

Style Usage:

Define an style that inherits from an android base theme

<style name="CustomDialogThemeDark" parent="@*android:style/Theme.Holo.Dialog.Alert">

or

<style name="CustomDialogThemeLight" parent="@*android:style/Theme.Holo.Light.Dialog.Alert">

or define your own dialog style

Depends on http://review.cyanogenmod.org/#/c/61392

Change-Id: I409eba2674f68386cdd20b74fc3ea42b8e81d111
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Clean up cursors in try/finally

Make sure we release cursor resources.

Change-Id: Ia122100b1350ae5db4804f8f0e95c49785ab645b
Deactivate the MiniThumbFile when it is not needed.

Issue description:
Unable to use camera after deleting all files in internal storage from PC
with MTP. The toast message "Connect USB storage before using the camera"
is poped up when we launch camera after deleting all files in internal storage
from PC with MTP.

Steps to reproduce the issue:
1. Launch Camera and take a picture.
2. Connect device to PC with MTP mode.
3. Delete all files on Internal stoage from PC.
4. Launch Camera after step 3 finished.
Then we find that we are unable to use camera and the toast message is poped
up.

Root cause:
The .thumbdata3--xxxxx in /sdcard/DCIM/.thumbnails/ is opened in
android.process.media process when we take picture in step 1. But the file is
never closed. So camera cannot create the directories(/sdcard/DCIM/Camera)
it needs to store captured pictures because "Device busy" error.

Solution:
Deactivate the MiniThumbFile when it is not needed.

Change-Id: I0faab5ffd95c5626f7f9ef1bc02b2ae56e2eb19b
Signed-off-by: hanpengx <pengfeix.han@intel.com>
Merge remote-tracking branch 'cm/cm-11.0' into HEAD

Conflicts:
	src/com/android/providers/media/MediaProvider.java
Automatic translation import

Change-Id: I4dec6e4918727558550aaa3ffdcd83383e2e5076
Automatic translation import

Change-Id: Idf0d39445acf8960c79691afec3b74408736c0eb
Automatic translation import

Change-Id: I3d04057886de005de98091b8fa0f249140eb35e9
MediaProvider: Avoid issue of android.process.media stop

"OK" and "Cancel" button's click event response at the same time
lead to FATAL EXCEPTION. Make the click events do not happen at
the same time.

Change-Id: I92fc1dc15be42d0bd9fe54f41fdbb26b3ca4b85c
CRs-Fixed: 513752
MediaProvider: Add feature to support group music by folder path

There is no support to group music by folder path.

Add extra query sql statement for supporting group music
by folder path.

CRs-Fixed: 620983

Change-Id: If0036efe8c9ebbea11c7aca1752e1d12b2287955
MediaProvider: support streaming bookmark

Add bookmarks table and bookmark URI.

CRs-Fixed: 637282
Change-Id: I4414a1619066efe58457350a82394d56d26d41bb
MediaProvider: Make folder music change when delete music

Lack the register for folder music uri,which cause the data
not change we obtain the change from uri.

Register uri for folder music to make correspoing cursor
change when data change.

CRs-fixed: 661198

Change-Id: I3b36851e0592efee66ae107b73ce3c43153b3913
MediaProvider: Structure and sanitize input in AUDIO_FOLDER logic from CAF.

Change-Id: I6f43630c0c262383da6a656205a09fd048b60f2a