| OLD | NEW |
| 1 /* This Source Code Form is subject to the terms of the Mozilla Public | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
| 2 * License, v. 2.0. If a copy of the MPL was not distributed with this file, | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
| 3 * You can obtain one at http://mozilla.org/MPL/2.0/. */ | 3 * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 4 | 4 |
| 5 package org.mozilla.gecko; | 5 package org.mozilla.gecko; |
| 6 | 6 |
| 7 import android.Manifest; | 7 import android.Manifest; |
| 8 import android.app.Activity; | 8 import android.app.Activity; |
| 9 import android.app.Application; | 9 import android.app.Application; |
| 10 import android.content.ContentResolver; | 10 import android.content.ContentResolver; |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 "Snackbar:Show", | 306 "Snackbar:Show", |
| 307 "Share:Text", | 307 "Share:Text", |
| 308 null); | 308 null); |
| 309 EventDispatcher.getInstance().registerBackgroundThreadListener(mListener
, | 309 EventDispatcher.getInstance().registerBackgroundThreadListener(mListener
, |
| 310 "PushServiceAndroidGCM:Configure", | 310 "PushServiceAndroidGCM:Configure", |
| 311 "Bookmark:Insert", | 311 "Bookmark:Insert", |
| 312 "Image:SetAs", | 312 "Image:SetAs", |
| 313 "Profile:Create", | 313 "Profile:Create", |
| 314 null); | 314 null); |
| 315 | 315 |
| 316 // Added AddOnBridge initialisation here for resending requests that for
some reason, | 316 // Added ExtensionBridge initialisation here for resending requests that
for some reason, |
| 317 // couldn't be saved by the extension | 317 // couldn't be saved by the extension |
| 318 // See https://issues.adblockplus.org/ticket/2853 | 318 // See https://issues.adblockplus.org/ticket/2853 |
| 319 org.adblockplus.browser.AddOnBridge.init(context); | 319 org.adblockplus.browser.ExtensionBridge.init(context); |
| 320 | 320 |
| 321 super.onCreate(); | 321 super.onCreate(); |
| 322 } | 322 } |
| 323 | 323 |
| 324 /** | 324 /** |
| 325 * May be called when a new GeckoApplication object | 325 * May be called when a new GeckoApplication object |
| 326 * replaces an old one due to assets change. | 326 * replaces an old one due to assets change. |
| 327 */ | 327 */ |
| 328 private void onDestroy() { | 328 private void onDestroy() { |
| 329 EventDispatcher.getInstance().unregisterGeckoThreadListener(mListener, | 329 EventDispatcher.getInstance().unregisterGeckoThreadListener(mListener, |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 | 804 |
| 805 @Override // HapticFeedbackDelegate | 805 @Override // HapticFeedbackDelegate |
| 806 public void performHapticFeedback(final int effect) { | 806 public void performHapticFeedback(final int effect) { |
| 807 final Activity currentActivity = | 807 final Activity currentActivity = |
| 808 GeckoActivityMonitor.getInstance().getCurrentActivity(); | 808 GeckoActivityMonitor.getInstance().getCurrentActivity(); |
| 809 if (currentActivity != null) { | 809 if (currentActivity != null) { |
| 810 currentActivity.getWindow().getDecorView().performHapticFeedback(eff
ect); | 810 currentActivity.getWindow().getDecorView().performHapticFeedback(eff
ect); |
| 811 } | 811 } |
| 812 } | 812 } |
| 813 } | 813 } |
| OLD | NEW |