#6364 closed change (fixed)

Exclude double initialization of AdblockHelper

Reported by: asmirnov Assignee:
Priority: P3 Milestone:
Module: Libadblockplus-Android Keywords:
Cc: Blocked By:
Blocking: Platform: Android
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29691555/

Description

Background

Now it's possible to call AdblockHelper.get().init(..) (https://github.com/adblockplus/libadblockplus-android/blob/master/libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java#L141) multiple times and this results in multiple SingleInstanceEngineProvider created.
Though we have shown the right API usage (https://github.com/adblockplus/libadblockplus-android/blob/master/libadblockplus-android-webviewapp/src/org/adblockplus/libadblockplus/android/webviewapp/Application.java#L66) it would be better to exclude the possibility to make something wrong.

What to change

Add isInit() method and avoid multiple initialization.

Change History (3)

comment:1 Changed 21 months ago by asmirnov

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:3 Changed 21 months ago by asmirnov

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.