BTW-- Sometime, I don't see the uevent for battery capacity change hence the battery icon is not updated. To solve it, I added a timer to call the update function. But it may not be good for your battery life. On Wed, 2009-06-10 at 05:07 -0700, Yi Sun wrote: > look at the update function in BatteryService.java. It is triggered by > uevent. And the icon will only be updated when cap dropped to certain > level. > On Wed, 2009-06-10 at 04:42 -0700, Androidphan wrote: > > I found the problem. The BATTERY_CAPACITY_PATH is transfered to > > mBatterLevel, in my code it was the total 'amount' of battery and the > > BATTERY_VOLTAGE_PATH was the amount of battery left. This amount left > > is now scaled to fit between 0 and 100. It has to be between these > > numbers because the code searches an icon based on this number. If its > > too high, it can't find an appropriate icon. Maybe this helps to other > > people. > > > > What I still need to do is to find out how Android can update the > > battery more often. It's only updated when I unplug and plug the > > adapter yet. > > > > On Jun 10, 11:07 am, Yi Sun <[email protected]> wrote: > > > Ok, here is the thing you may need to dig into; you may need to debug > > > into statusbarservice code to see why your icon does not show up. Look > > > at the code in frameworks/base/service/java/com/android/server/status > > > > > > > > > > > > On Wed, 2009-06-10 at 01:39 -0700, Androidphan wrote: > > > > Now that I'm using vold again, it doesn't show a battery icon. It does > > > > show a too big percentage level when I plug back in the power supply. > > > > > > > On Jun 10, 10:28 am, Yi Sun <[email protected]> wrote: > > > > > Then, I don't have any idea for you :-( sorry. > > > > > > > > On Wed, 2009-06-10 at 01:15 -0700, Androidphan wrote: > > > > > > I'm not using vold, but mountd. > > > > > > > > > On Jun 10, 9:53 am, Yi Sun <[email protected]> wrote: > > > > > > > ACPI standard said : > > > > > > > (charge_now/charge_full) * scale > > > > > > > I thought I have posted the fix for this part in my earlier > > > > > > > patches, > > > > > > > need to check it. > > > > > > > > > > BTW-- if I remember it correct, the vold crash may cause you lost > > > > > > > your > > > > > > > battery icon (I seems to remember it happens that way. It has > > > > > > > been a > > > > > > > while already) > > > > > > > > > > On Wed, 2009-06-10 at 00:31 -0700, Androidphan wrote: > > > > > > > > My sys fs paths are good. But the values of it are from 0 to > > > > > > > > 4338000 > > > > > > > > in stead of 0 - 100 like it normally is? > > > > > > > > > > > On Jun 9, 3:01 am, Yi Sun <[email protected]> wrote: > > > > > > > > > I have never see it. But is you sys fs patch is worng, you > > > > > > > > > could end up > > > > > > > > > with a red square with cross in it. > > > > > > > > > > > > On Mon, 2009-06-08 at 06:02 -0700, Androidphan wrote: > > > > > > > > > > Do more people have the problem that they don't see any > > > > > > > > > > battery icon > > > > > > > > > > on the status bar? Does it supposed to be there with the > > > > > > > > > > battery patch? > > > >
--~--~---------~--~----~------------~-------~--~----~ unsubscribe: [email protected] website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---
