mydroid/cdma-import/frameworks/base/core/jni/server/com_android_server_BatteryService.cpp
Loading...
Index: mydroid/cdma-import/frameworks/base/core/jni/server/com_android_server_BatterySer vice.cpp ============================================================== ===== --- mydroid/cdma-import/frameworks/base/core/jni/server/com_android_server_BatterySer vice.cpp (revision 49) +++ mydroid/cdma-import/frameworks/base/core/jni/server/com_android_server_BatterySer vice.cpp (revision 147) @@ -173,6 +173,7 @@ static void android_server_BatteryService_update(JNIEnv* env, jobject obj) { +/* setBooleanField(env, obj, AC_ONLINE_PATH, gFieldIds.mAcOnline); setBooleanField(env, obj, USB_ONLINE_PATH, gFieldIds.mUsbOnline); setBooleanField(env, obj, BATTERY_PRESENT_PATH, gFieldIds.mBatteryPresent); @@ -180,7 +181,15 @@ setIntField(env, obj, BATTERY_CAPACITY_PATH, gFieldIds.mBatteryLevel); setIntField(env, obj, BATTERY_VOLTAGE_PATH, gFieldIds.mBatteryVoltage); setIntField(env, obj, BATTERY_TEMPERATURE_PATH, gFieldIds.mBatteryTemperature); - + */ + env->SetBooleanField(obj, gFieldIds.mAcOnline,true); + env->SetBooleanField(obj, gFieldIds.mUsbOnline,true); + env->SetBooleanField(obj, gFieldIds.mBatteryPresent,true); + env->SetIntField(obj, gFieldIds.mBatteryLevel,100); + env->SetIntField(obj, gFieldIds.mBatteryVoltage,3); + env->SetIntField(obj, gFieldIds.mBatteryTemperature,10); + + /* const int SIZE = 128; char buf[SIZE]; @@ -192,6 +201,9 @@ if (readFromFile(BATTERY_TECHNOLOGY_PATH, buf, SIZE) > 0) env->SetObjectField(obj, gFieldIds.mBatteryTechnology, env->NewStringUTF(buf)); + */ + env->SetIntField(obj, gFieldIds.mBatteryStatus,gConstants.statusCharging); + env->SetIntField(obj, gFieldIds.mBatteryHealth,gConstants.healthGood); } static JNINativeMethod sMethods[] = {
Loading...
發表迴響