Merge "Add constant for SDCARD_RW group ID."
This commit is contained in:
committed by
Android (Google) Code Review
commit
ab853b39be
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user