Closed
Bug 705041
Opened 9 years ago
Closed 9 years ago
Unable to resolve virtual method 1210: Lorg/mozilla/gecko/GeckoApp;.getActionBar
Categories
(Firefox for Android Graveyard :: General, defect, P4)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mfinkle, Assigned: sriram)
Details
Attachments
(1 file)
6.27 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
Even though the code is not executed, the byte code is verified. The result dumps this into logcat. It would be nice to remove it, just for cleanliness: I/dalvikvm( 8686): Could not find method org.mozilla.gecko.GeckoApp.getActionBar, referenced from method org.mozilla.gecko.GeckoApp.onCreate W/dalvikvm( 8686): VFY: unable to resolve virtual method 1210: Lorg/mozilla/gecko/GeckoApp;.getActionBar ()Landroid/app/ActionBar; D/dalvikvm( 8686): VFY: replacing opcode 0x6e at 0x006b D/dalvikvm( 8686): VFY: dead code 0x006e-0090 in Lorg/mozilla/gecko/GeckoApp;.onCreate (Landroid/os/Bundle;)V I found this method for doing it: http://stackoverflow.com/questions/6495007/verifyerror-deploying-on-api-1-6 It uses a helper class to hide the bytecode.
Assignee | ||
Comment 1•9 years ago
|
||
This patch uses the Helper class pattern. I don't see any error with this. However, I don't quite like this pattern :( We would have to shadow each function we use from ActionBar - which could get messier. I tried looking at alternative options, but couldn't find any.
Attachment #578062 -
Flags: review?(mark.finkle)
Reporter | ||
Comment 2•9 years ago
|
||
Comment on attachment 578062 [details] [diff] [review] Patch You mentioned doing this using styles. Can we see that patch too?
Assignee | ||
Comment 3•9 years ago
|
||
Doing with styles isn't working well. Though there are XML attributes for the method equivalents in Java, somehow it is not taking them properly. Like for e.g., I tried setting up "showHome|homeAsUp" as an XML attribute. I allows me to go back, but doesn't show me the arrow -- which is shown if we use Java methods. Also, the custom layout is not working either. We need to get the actionBar, to get the mBrowserToolbar during onCreate(), which will still case "VFY error", demanding us to use classes (like in the above patch). I would probably go with the above approach for now. I'll try to find a better approach later.
Reporter | ||
Updated•9 years ago
|
Attachment #578062 -
Flags: review?(mark.finkle) → review+
Reporter | ||
Comment 4•9 years ago
|
||
https://hg.mozilla.org/projects/birch/rev/a59a0a33c9d6
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Updated•1 month ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•