diff options
| author | Marco Nelissen <marcone@google.com> | 2009-07-17 08:27:29 -0700 |
|---|---|---|
| committer | Marco Nelissen <marcone@google.com> | 2009-07-17 08:38:56 -0700 |
| commit | d46290031aa380d700ed165a53798a7f53a89630 (patch) | |
| tree | e8dc0ce72c4b0be5987f7013c661bab444d2911a /simulator | |
| parent | 7b627e8935bc6a63bd8ae1d7de056af9a4d0386e (diff) | |
| download | android_development-d46290031aa380d700ed165a53798a7f53a89630.tar.gz android_development-d46290031aa380d700ed165a53798a7f53a89630.tar.bz2 android_development-d46290031aa380d700ed165a53798a7f53a89630.zip | |
Pretend to be root by intercepting getuid() in the simulator, so we don't have
to litter the framework with if(Process.supportsProcesses()).
Diffstat (limited to 'simulator')
| -rw-r--r-- | simulator/wrapsim/Intercept.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/simulator/wrapsim/Intercept.c b/simulator/wrapsim/Intercept.c index 09547fb26..3d4edb27a 100644 --- a/simulator/wrapsim/Intercept.c +++ b/simulator/wrapsim/Intercept.c @@ -823,6 +823,16 @@ int setpriority(__priority_which_t which, id_t who, int what) return 0; } +/* + * Pretend to be running as root, so the Android framework + * doesn't complain about permission problems all over the + * place. + */ +uid_t getuid(void) +{ + return 0; +} + #if 0 /* * Create a pipe. (Only needed for debugging an fd leak.) |
