This seems like a very silly question.
where am I suppossed to put this file
"com_android_server_BatteryService.cpp" in the kernel source and build
the image again, or somewhere in the filesystem. kindly please let me
know the directory where in I have to put it.

Regards,
Shridhar

On Tue, Jun 9, 2009 at 2:26 PM, Neil Nguyen<[email protected]> wrote:
>
>
> You are right, it is a copy we use.
> Sorry, it is patched already.  I hope it will work for you.
> Neil
>
> --- On Tue, 6/9/09, Elvis Dowson <[email protected]> wrote:
>
>> From: Elvis Dowson <[email protected]>
>> Subject: [android-porting] Re: MX27 Android porting problems
>> To: [email protected]
>> Date: Tuesday, June 9, 2009, 3:06 PM
>> Hi Shridhar,
>>                 That is a full source file, if you
>> want a patch, here it is for the android-1.5r2
>> release.
>> Best regards,
>> Elvis
>>
>> diff --git
>> a/services/jni/com_android_server_BatteryService.cpp
>> b/services/jni/com_android_server_BatteryService.cppindex
>> 6636a97..748f514 100644---
>> a/services/jni/com_android_server_BatteryService.cpp
>> +++
>> b/services/jni/com_android_server_BatteryService.cpp@@
>> -150,12 +150,12 @@ static void setBooleanField(JNIEnv* env,
>> jobject obj, const char* path, jfieldID
>> const int SIZE = 16;
>>      char buf[SIZE];     -
>>  jboolean value = false;-    if
>> (readFromFile(path, buf, SIZE) > 0) {+
>>  jboolean value = true;+/*    if
>> (readFromFile(path, buf, SIZE) > 0) {
>>          if (buf[0] == '1')
>> {             value = true;
>>       }-    }+    }
>> */     env->SetBooleanField(obj, fieldID,
>> value); }
>>  @@ -164,10 +164,10 @@ static void
>> setIntField(JNIEnv* env, jobject obj, const char* path,
>> jfieldID fie     const int SIZE =
>> 128;     char buf[SIZE];
>>   -    jint value = 0;
>> -    if (readFromFile(path, buf, SIZE) > 0)
>> {+    jint value = 100;+/*    if
>> (readFromFile(path, buf, SIZE) > 0) {
>>     value = atoi(buf);-    }+
>>  } */
>>      env->SetIntField(obj, fieldID,
>> value); } @@ -181,17
>> +181,21 @@ static void
>> android_server_BatteryService_update(JNIEnv* env, jobject
>> obj)     setIntField(env, obj,
>> BATTERY_VOLTAGE_PATH, gFieldIds.mBatteryVoltage);
>>      setIntField(env, obj,
>> BATTERY_TEMPERATURE_PATH,
>> gFieldIds.mBatteryTemperature);
>>   +    env->SetIntField(obj,
>> gFieldIds.mBatteryStatus,
>> gConstants.statusFull);+
>>  env->SetIntField(obj, gFieldIds.mBatteryHealth,
>> gConstants.healthGood);
>> +    env->SetObjectField(obj,
>> gFieldIds.mBatteryTechnology,
>> env->NewStringUTF("1"));+
>>       const int SIZE = 128;
>> char buf[SIZE];     -    if
>> (readFromFile(BATTERY_STATUS_PATH, buf, SIZE) > 0)
>> +/*    if (readFromFile(BATTERY_STATUS_PATH, buf,
>> SIZE) > 0)
>> env->SetIntField(obj, gFieldIds.mBatteryStatus,
>> getBatteryStatus(buf));
>>   if (readFromFile(BATTERY_HEALTH_PATH, buf, SIZE) >
>> 0)
>>          env->SetIntField(obj,
>> gFieldIds.mBatteryHealth,
>> getBatteryHealth(buf));      if
>> (readFromFile(BATTERY_TECHNOLOGY_PATH, buf, SIZE) >
>> 0)-        env->SetObjectField(obj,
>> gFieldIds.mBatteryTechnology,
>> env->NewStringUTF(buf));
>> +        env->SetObjectField(obj,
>> gFieldIds.mBatteryTechnology, env->NewStringUTF(buf));
>>  */ }  static
>> JNINativeMethod sMethods[] = {
>>
>> >
>>
>>
>>
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to