Loading cmds/system_server/system_main.cpp +0 −5 Original line number Diff line number Diff line Loading @@ -52,10 +52,5 @@ int main(int argc, const char* const argv[]) LOGW("*** Current priority: %d\n", getpriority(PRIO_PROCESS, 0)); setpriority(PRIO_PROCESS, 0, -1); #if HAVE_ANDROID_OS //setgid(GID_SYSTEM); //setuid(UID_SYSTEM); #endif system_init(); } core/jni/AndroidRuntime.cpp +0 −7 Original line number Diff line number Diff line Loading @@ -623,16 +623,9 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv) } /* enable debugging; set suspend=y to pause during VM init */ #ifdef HAVE_ANDROID_OS /* use android ADB transport */ opt.optionString = "-agentlib:jdwp=transport=dt_android_adb,suspend=n,server=y"; #else /* use TCP socket; address=0 means start at port 8000 and probe up */ LOGI("Using TCP socket for JDWP\n"); opt.optionString = "-agentlib:jdwp=transport=dt_socket,suspend=n,server=y,address=0"; #endif mOptions.add(opt); char enableDPBuf[sizeof("-Xdeadlockpredict:") + PROPERTY_VALUE_MAX]; Loading core/jni/android_net_TrafficStats.cpp +0 −8 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ enum Tcp_Udp { // Returns an ASCII decimal number read from the specified file, -1 on error. static jlong readNumber(char const* filename) { #ifdef HAVE_ANDROID_OS char buf[80]; int fd = open(filename, O_RDONLY); if (fd < 0) { Loading @@ -62,9 +61,6 @@ static jlong readNumber(char const* filename) { close(fd); buf[len] = '\0'; return atoll(buf); #else // Simulator return -1; #endif } static const char* mobile_iface_list[] = { Loading Loading @@ -101,7 +97,6 @@ static jlong getAll(const char** iface_list, const char* what) { // Returns the sum of numbers from the specified path under /sys/class/net/*, // -1 if no such file exists. static jlong readTotal(char const* suffix) { #ifdef HAVE_ANDROID_OS char filename[PATH_MAX] = "/sys/class/net/"; DIR *dir = opendir(filename); if (dir == NULL) { Loading @@ -123,9 +118,6 @@ static jlong readTotal(char const* suffix) { closedir(dir); return total; #else // Simulator return -1; #endif } // Mobile stats get accessed a lot more often than total stats. Loading core/jni/android_os_Debug.cpp +0 −6 Original line number Diff line number Diff line Loading @@ -278,7 +278,6 @@ jint android_os_Debug_getProxyObjectCount(JNIEnv* env, jobject clazz); jint android_os_Debug_getDeathObjectCount(JNIEnv* env, jobject clazz); #ifdef HAVE_ANDROID_OS /* pulled out of bionic */ extern "C" void get_malloc_leak_info(uint8_t** info, size_t* overallSize, size_t* infoSize, size_t* totalMemory, size_t* backtraceSize); Loading Loading @@ -414,7 +413,6 @@ static void dumpNativeHeap(FILE* fp) fprintf(fp, "END\n"); } #endif /*HAVE_ANDROID_OS*/ /* * Dump the native heap, writing human-readable output to the specified Loading Loading @@ -449,13 +447,9 @@ static void android_os_Debug_dumpNativeHeap(JNIEnv* env, jobject clazz, return; } #ifdef HAVE_ANDROID_OS LOGD("Native heap dump starting...\n"); dumpNativeHeap(fp); LOGD("Native heap dump complete.\n"); #else fprintf(fp, "Native heap dump not available on this platform\n"); #endif fclose(fp); } Loading core/jni/android_os_FileUtils.cpp +0 −15 Original line number Diff line number Diff line Loading @@ -28,11 +28,8 @@ #include <sys/types.h> #include <fcntl.h> #include <signal.h> #if HAVE_ANDROID_OS #include <sys/ioctl.h> #include <linux/msdos_fs.h> #endif namespace android { Loading @@ -53,7 +50,6 @@ jint android_os_FileUtils_setPermissions(JNIEnv* env, jobject clazz, jstring file, jint mode, jint uid, jint gid) { #if HAVE_ANDROID_OS const jchar* str = env->GetStringCritical(file, 0); String8 file8; if (str) { Loading @@ -70,15 +66,11 @@ jint android_os_FileUtils_setPermissions(JNIEnv* env, jobject clazz, } } return chmod(file8.string(), mode) == 0 ? 0 : errno; #else return ENOSYS; #endif } jint android_os_FileUtils_getPermissions(JNIEnv* env, jobject clazz, jstring file, jintArray outArray) { #if HAVE_ANDROID_OS const jchar* str = env->GetStringCritical(file, 0); String8 file8; if (str) { Loading Loading @@ -107,9 +99,6 @@ jint android_os_FileUtils_getPermissions(JNIEnv* env, jobject clazz, } env->ReleasePrimitiveArrayCritical(outArray, array, 0); return 0; #else return ENOSYS; #endif } jint android_os_FileUtils_setUMask(JNIEnv* env, jobject clazz, jint mask) Loading @@ -119,7 +108,6 @@ jint android_os_FileUtils_setUMask(JNIEnv* env, jobject clazz, jint mask) jint android_os_FileUtils_getFatVolumeId(JNIEnv* env, jobject clazz, jstring path) { #if HAVE_ANDROID_OS if (path == NULL) { jniThrowException(env, "java/lang/IllegalArgumentException", NULL); return -1; Loading @@ -137,9 +125,6 @@ jint android_os_FileUtils_getFatVolumeId(JNIEnv* env, jobject clazz, jstring pat env->ReleaseStringUTFChars(path, pathStr); return result; #else return -1; #endif } jboolean android_os_FileUtils_getFileStatus(JNIEnv* env, jobject clazz, jstring path, jobject fileStatus) { Loading Loading
cmds/system_server/system_main.cpp +0 −5 Original line number Diff line number Diff line Loading @@ -52,10 +52,5 @@ int main(int argc, const char* const argv[]) LOGW("*** Current priority: %d\n", getpriority(PRIO_PROCESS, 0)); setpriority(PRIO_PROCESS, 0, -1); #if HAVE_ANDROID_OS //setgid(GID_SYSTEM); //setuid(UID_SYSTEM); #endif system_init(); }
core/jni/AndroidRuntime.cpp +0 −7 Original line number Diff line number Diff line Loading @@ -623,16 +623,9 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv) } /* enable debugging; set suspend=y to pause during VM init */ #ifdef HAVE_ANDROID_OS /* use android ADB transport */ opt.optionString = "-agentlib:jdwp=transport=dt_android_adb,suspend=n,server=y"; #else /* use TCP socket; address=0 means start at port 8000 and probe up */ LOGI("Using TCP socket for JDWP\n"); opt.optionString = "-agentlib:jdwp=transport=dt_socket,suspend=n,server=y,address=0"; #endif mOptions.add(opt); char enableDPBuf[sizeof("-Xdeadlockpredict:") + PROPERTY_VALUE_MAX]; Loading
core/jni/android_net_TrafficStats.cpp +0 −8 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ enum Tcp_Udp { // Returns an ASCII decimal number read from the specified file, -1 on error. static jlong readNumber(char const* filename) { #ifdef HAVE_ANDROID_OS char buf[80]; int fd = open(filename, O_RDONLY); if (fd < 0) { Loading @@ -62,9 +61,6 @@ static jlong readNumber(char const* filename) { close(fd); buf[len] = '\0'; return atoll(buf); #else // Simulator return -1; #endif } static const char* mobile_iface_list[] = { Loading Loading @@ -101,7 +97,6 @@ static jlong getAll(const char** iface_list, const char* what) { // Returns the sum of numbers from the specified path under /sys/class/net/*, // -1 if no such file exists. static jlong readTotal(char const* suffix) { #ifdef HAVE_ANDROID_OS char filename[PATH_MAX] = "/sys/class/net/"; DIR *dir = opendir(filename); if (dir == NULL) { Loading @@ -123,9 +118,6 @@ static jlong readTotal(char const* suffix) { closedir(dir); return total; #else // Simulator return -1; #endif } // Mobile stats get accessed a lot more often than total stats. Loading
core/jni/android_os_Debug.cpp +0 −6 Original line number Diff line number Diff line Loading @@ -278,7 +278,6 @@ jint android_os_Debug_getProxyObjectCount(JNIEnv* env, jobject clazz); jint android_os_Debug_getDeathObjectCount(JNIEnv* env, jobject clazz); #ifdef HAVE_ANDROID_OS /* pulled out of bionic */ extern "C" void get_malloc_leak_info(uint8_t** info, size_t* overallSize, size_t* infoSize, size_t* totalMemory, size_t* backtraceSize); Loading Loading @@ -414,7 +413,6 @@ static void dumpNativeHeap(FILE* fp) fprintf(fp, "END\n"); } #endif /*HAVE_ANDROID_OS*/ /* * Dump the native heap, writing human-readable output to the specified Loading Loading @@ -449,13 +447,9 @@ static void android_os_Debug_dumpNativeHeap(JNIEnv* env, jobject clazz, return; } #ifdef HAVE_ANDROID_OS LOGD("Native heap dump starting...\n"); dumpNativeHeap(fp); LOGD("Native heap dump complete.\n"); #else fprintf(fp, "Native heap dump not available on this platform\n"); #endif fclose(fp); } Loading
core/jni/android_os_FileUtils.cpp +0 −15 Original line number Diff line number Diff line Loading @@ -28,11 +28,8 @@ #include <sys/types.h> #include <fcntl.h> #include <signal.h> #if HAVE_ANDROID_OS #include <sys/ioctl.h> #include <linux/msdos_fs.h> #endif namespace android { Loading @@ -53,7 +50,6 @@ jint android_os_FileUtils_setPermissions(JNIEnv* env, jobject clazz, jstring file, jint mode, jint uid, jint gid) { #if HAVE_ANDROID_OS const jchar* str = env->GetStringCritical(file, 0); String8 file8; if (str) { Loading @@ -70,15 +66,11 @@ jint android_os_FileUtils_setPermissions(JNIEnv* env, jobject clazz, } } return chmod(file8.string(), mode) == 0 ? 0 : errno; #else return ENOSYS; #endif } jint android_os_FileUtils_getPermissions(JNIEnv* env, jobject clazz, jstring file, jintArray outArray) { #if HAVE_ANDROID_OS const jchar* str = env->GetStringCritical(file, 0); String8 file8; if (str) { Loading Loading @@ -107,9 +99,6 @@ jint android_os_FileUtils_getPermissions(JNIEnv* env, jobject clazz, } env->ReleasePrimitiveArrayCritical(outArray, array, 0); return 0; #else return ENOSYS; #endif } jint android_os_FileUtils_setUMask(JNIEnv* env, jobject clazz, jint mask) Loading @@ -119,7 +108,6 @@ jint android_os_FileUtils_setUMask(JNIEnv* env, jobject clazz, jint mask) jint android_os_FileUtils_getFatVolumeId(JNIEnv* env, jobject clazz, jstring path) { #if HAVE_ANDROID_OS if (path == NULL) { jniThrowException(env, "java/lang/IllegalArgumentException", NULL); return -1; Loading @@ -137,9 +125,6 @@ jint android_os_FileUtils_getFatVolumeId(JNIEnv* env, jobject clazz, jstring pat env->ReleaseStringUTFChars(path, pathStr); return result; #else return -1; #endif } jboolean android_os_FileUtils_getFileStatus(JNIEnv* env, jobject clazz, jstring path, jobject fileStatus) { Loading