Merge "Add constant for SDCARD_RW group ID."

This commit is contained in:
Mike Lockwood
2010-09-24 10:45:38 -07:00
committed by Android (Google) Code Review
2 changed files with 8 additions and 3 deletions

View File

@@ -85,6 +85,12 @@ public class Process {
*/
public static final int WIFI_UID = 1010;
/**
* Defines the GID for the group that allows write access to the SD card.
* @hide
*/
public static final int SDCARD_RW_GID = 1015;
/**
* Defines the start of a range of UIDs (and GIDs), going from this
* number to {@link #LAST_APPLICATION_UID} that are reserved for assigning

View File

@@ -200,9 +200,8 @@ public class ObjectViewer extends Activity {
}
// temporary workaround until we straighten out permissions in /data/media
// 1015 is AID_SDCARD_RW
FileUtils.setPermissions(destDir.getPath(), 0775, Process.myUid(), 1015);
FileUtils.setPermissions(destFile.getPath(), 0664, Process.myUid(), 1015);
FileUtils.setPermissions(destDir.getPath(), 0775, Process.myUid(), Process.SDCARD_RW_GID);
FileUtils.setPermissions(destFile.getPath(), 0664, Process.myUid(), Process.SDCARD_RW_GID);
success = true;
}