Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab853b39 authored by Mike Lockwood's avatar Mike Lockwood Committed by Android (Google) Code Review
Browse files

Merge "Add constant for SDCARD_RW group ID."

parents 8fee3820 58fd98ac
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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
+2 −3
Original line number Diff line number Diff line
@@ -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;
            }