summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-05-27 18:34:46 +0100
committerBen Murdoch <benm@google.com>2010-05-27 18:53:58 +0100
commit07d3473804cdfd646b39001ca80ebf530e8f8749 (patch)
tree89760f88983293950e1d5b0689072938255ff0e9 /src/com
parente56a0f21b2c1483e1854d31050bbcb10693dc0e2 (diff)
downloadpackages_apps_Browser-07d3473804cdfd646b39001ca80ebf530e8f8749.zip
packages_apps_Browser-07d3473804cdfd646b39001ca80ebf530e8f8749.tar.gz
packages_apps_Browser-07d3473804cdfd646b39001ca80ebf530e8f8749.tar.bz2
Broadcast to the media scanner when the user takes a photo from the file picker so that it
gets added to their gallery rather than lingering inaccessible on the SD card. Change-Id: If7e67ff5b5126964f5e6cc1853e435abc2d75c40
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/browser/BrowserActivity.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 03bb9df..b2d7d82 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -3607,6 +3607,9 @@ public class BrowserActivity extends Activity
File cameraFile = new File(mCameraFilePath);
if (cameraFile.exists()) {
result = Uri.fromFile(cameraFile);
+ // Broadcast to the media scanner that we have a new photo
+ // so it will be added into the gallery for the user.
+ sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, result));
}
}