Revert "Merge to M65: Android Accessibility: Avoiding crash on unregistering broadcast receiver."

This reverts commit da433250fa7b5cb4fd094fe5186804eb5d0b6fba.

Reason for revert:
broke official arm builder:
https://uberchromegw.corp.google.com/i/official.android/builders/official-arm

also see crbug.com/814112

Original change's description:
> Merge to M65: Android Accessibility: Avoiding crash on unregistering broadcast receiver.
> 
> There might be cases where unregistering broadcast receiver can throw
> IllegalArgumentException if the context is not handled in an appropriate
> manner. This CL avoids the crash.
> 
> (cherry picked from commit 8839385d34f511f6498bc20edba638944b67d0cd)
> 
> Change-Id: I9d7888dcbde518caa6e7e426a215953e9c3ba672
> Bug: 780261
> Reviewed-on: https://chromium-review.googlesource.com/891458
> Reviewed-by: Bo <boliu@chromium.org>
> Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
> Commit-Queue: Isha Bobra <ibobra@google.com>
> Cr-Original-Commit-Position: refs/heads/master@{#532578}
> Reviewed-on: https://chromium-review.googlesource.com/927450
> Cr-Commit-Position: refs/branch-heads/3325@{#518}
> Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}

TBR=dmazzoni@chromium.org,ibobra@google.com

Change-Id: I280b10d888dcbe82a1c4e07a246450e32f84bab6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 780261
Reviewed-on: https://chromium-review.googlesource.com/929081
Reviewed-by: Tim Volodine <timvolodine@chromium.org>
Cr-Commit-Position: refs/branch-heads/3325@{#533}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
diff --git a/content/public/android/java/src/org/chromium/content/browser/accessibility/LollipopWebContentsAccessibility.java b/content/public/android/java/src/org/chromium/content/browser/accessibility/LollipopWebContentsAccessibility.java
index 5284952..55c19d0 100644
--- a/content/public/android/java/src/org/chromium/content/browser/accessibility/LollipopWebContentsAccessibility.java
+++ b/content/public/android/java/src/org/chromium/content/browser/accessibility/LollipopWebContentsAccessibility.java
@@ -153,16 +153,14 @@
 
     @Override
     public void onDetachedFromWindow() {
-        super.onDetachedFromWindow();
-        if (!isNativeInitialized()) return;
-        mContext.getApplicationContext().unregisterReceiver(mBroadcastReceiver);
+        mContext.unregisterReceiver(mBroadcastReceiver);
     }
 
     @Override
     public void onAttachedToWindow() {
         try {
             IntentFilter filter = new IntentFilter(Intent.ACTION_LOCALE_CHANGED);
-            mContext.getApplicationContext().registerReceiver(mBroadcastReceiver, filter);
+            mContext.registerReceiver(mBroadcastReceiver, filter);
         } catch (ReceiverCallNotAllowedException e) {
             // WebView may be running inside a BroadcastReceiver, in which case registerReceiver is
             // not allowed.