Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/upgrade/PackageReplacedBroadcastReceiver.java

Issue 2778763002: Android: Check intent action in broadcast receiver for package replaced (Closed)
Patch Set: 1 line if Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/upgrade/PackageReplacedBroadcastReceiver.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/upgrade/PackageReplacedBroadcastReceiver.java b/chrome/android/java/src/org/chromium/chrome/browser/upgrade/PackageReplacedBroadcastReceiver.java
index 99b09ffdf40975a55a9e318e193c171e9040e99f..3b8782df95d4f7265d87a6d5fcf2a0923e4ff121 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/upgrade/PackageReplacedBroadcastReceiver.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/upgrade/PackageReplacedBroadcastReceiver.java
@@ -4,7 +4,6 @@
package org.chromium.chrome.browser.upgrade;
-import android.annotation.SuppressLint;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -24,11 +23,10 @@ import android.os.Build;
* - This class immediately cullable by Android as soon as {@link #onReceive} returns. To kick off
* longer tasks, you must start a Service.
*/
-// TODO(crbug.com/635567): Fix this properly.
-@SuppressLint("UnsafeProtectedBroadcastReceiver")
public final class PackageReplacedBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
+ if (!Intent.ACTION_MY_PACKAGE_REPLACED.equals(intent.getAction())) return;
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N) return;
UpgradeIntentService.startMigrationIfNecessary(context);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698