summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/Android.mk6
-rw-r--r--gui/action.cpp12
2 files changed, 8 insertions, 10 deletions
diff --git a/gui/Android.mk b/gui/Android.mk
index 17defd953..51cf4ca05 100644
--- a/gui/Android.mk
+++ b/gui/Android.mk
@@ -74,7 +74,11 @@ ifeq ($(TW_ROUND_SCREEN), true)
LOCAL_CFLAGS += -DTW_ROUND_SCREEN
endif
-LOCAL_C_INCLUDES += bionic system/core/libpixelflinger/include
+LOCAL_C_INCLUDES += \
+ bionic \
+ system/core/include \
+ system/core/libpixelflinger/include
+
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
LOCAL_C_INCLUDES += external/stlport/stlport
endif
diff --git a/gui/action.cpp b/gui/action.cpp
index fef476287..9c8af35f4 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -32,7 +32,7 @@
#include <stdlib.h>
#include <sys/wait.h>
#include <dirent.h>
-#include <pwd.h>
+#include <private/android_filesystem_config.h>
#include <string>
#include <sstream>
@@ -938,14 +938,8 @@ int GUIAction::screenshot(std::string arg __unused)
time_t tm;
char path[256];
int path_len;
- uid_t uid = -1;
- gid_t gid = -1;
-
- struct passwd *pwd = getpwnam("media_rw");
- if (pwd) {
- uid = pwd->pw_uid;
- gid = pwd->pw_gid;
- }
+ uid_t uid = AID_MEDIA_RW;
+ gid_t gid = AID_MEDIA_RW;
const std::string storage = DataManager::GetCurrentStoragePath();
if (PartitionManager.Is_Mounted_By_Path(storage)) {