Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Patch to Resurrection Remix Kitkat packages/apps/Camera2 to fix external sd card access to camera
From eb128dca125bd9fd63ebd8a0b6ca78a1c1636d07 Mon Sep 17 00:00:00 2001
From: Shubhang <shubhang92@gmail.com>
Date: Sun, 19 Jan 2014 12:35:38 +0530
Subject: [PATCH] fix external sd card access to i9082
---
src/com/android/camera/StorageEnvironment.java | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/com/android/camera/StorageEnvironment.java b/src/com/android/camera/StorageEnvironment.java
index fe1890d..ee3d65c 100644
--- a/src/com/android/camera/StorageEnvironment.java
+++ b/src/com/android/camera/StorageEnvironment.java
@@ -4,6 +4,7 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.os.Environment;
import com.android.camera.app.CameraApp;
+import android.os.Build;
public class StorageEnvironment {
@@ -23,7 +24,20 @@ shared.edit().putString(CameraSettings.KEY_PHOTOVIDEO_STORAGE, shared.getString(
// getting sdcard path, can be a pain on various devices and would need more code
// change path here directly for your device :-)
// "/mnt/extSdCard/DCIM" = Samsung Galaxy S III
- path = "/mnt/extSdCard/DCIM";
+
+ // As the path has been hardcoded and not obtained dynamically,
+ // hence device specific path can be added by using Build class of android.
+
+ if (((Build.MODEL).toUpperCase().equals("GT-I9082")) || ((Build.MODEL).toUpperCase().equals("I9082")) || ((Build.MODEL).toUpperCase().equals("BAFFIN")))
+ {
+
+ path = "/storage/sdcard1/DCIM"; // path for GT-I9082
+
+ } else {
+
+ path = "/mnt/extSdCard/DCIM";
+
+ }
}
--
1.8.5.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.