Closed Bug 1328684 Opened 8 years ago Closed 8 years ago

Convert SharedPreferencesHelper events to bundle events

Categories

(GeckoView :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox53 fixed)

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: jchen, Assigned: jchen)

References

Details

Attachments

(1 file)

No description provided.
Convert events used in SharedPreferencesHelper to GeckoBundle/BundleEventListener events. Gecko thread events are used because the listeners are expected to be synchronous, especially for the SharedPreferences:Get event, which also requires a synchronous callback.
Attachment #8823790 - Flags: review?(s.kaspari)
Comment on attachment 8823790 [details] [diff] [review] Convert SharedPreferencesHelper events to bundle events (v1) Review of attachment 8823790 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/java/org/mozilla/gecko/SharedPreferencesHelper.java @@ +147,2 @@ > } > + editor.apply(); Woops, nice catch - .. to apply the changes only once. @@ +211,5 @@ > + try { > + msg.putBoolean("value", sharedPreferences.getBoolean(key, false)); > + return; > + } catch (final ClassCastException e) { > + } Not nice, but it seems like it's our only option.
Attachment #8823790 - Flags: review?(s.kaspari) → review+
Pushed by nchen@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/4d1775e57bcc Convert SharedPreferencesHelper events to bundle events; r=sebastian
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
Product: Firefox for Android → GeckoView
Target Milestone: Firefox 53 → mozilla53
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: