Closed Bug 977171 Opened 10 years ago Closed 6 years ago

Add generic interface logger

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INACTIVE

People

(Reporter: jchen, Assigned: jchen)

Details

Attachments

(4 files)

While working on bug 971355, I wrote a class (org.mozilla.gecko.utils.LoggingInterface) that will take an object and return a proxy that logs all calls made on interfaces implemented by that object.

For example, this is very useful for debugging IME code; give the proxy a GeckoInputConnection object, and it will log all calls made on the InputConnection interface. I'm sure it can be useful for other cases, too.
LoggingInterface has a create static method that will return a logging proxy. For example,

> Foo foo = new Foo();
> IFoo proxy = (IFoo) LoggingInterface.create(foo);

Now all calls through |proxy| will be logged.
Several utility methods in GeckoEditable are now in LoggingInterface
LoggingInterface replaces the custom DebugGeckoInputConnection class that we had before.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: