IT mydroidcdmaimportframeworksbasecore jniservercomandroidserverBattery Servic ecpp

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, gFieldlds.mBattery Temperature, 10);

if (readFromFile(BATTERY_TECHNOLOGY_PATH, buf, SIZE) > 0) env->SetObj ectField(obj, gFieldIds.mBatteryTechnology, env->NewStringUTF(buf));

+ env->SetIntField(obj, gFieldIds.mBatteryStatus,gConstants.statusCharging);

+ env->SetIntField(obj, gFieldIds.mBatteryHealth,gConstants.healthGood);

static JNINativeMethod sMethods[] = {

0 0

Post a comment