OSDN Git Service

CaptivePortalTracker.java: add Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT
authorYongqin Liu <yongqin.liu@linaro.org>
Mon, 12 Aug 2013 08:35:00 +0000 (16:35 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 25 Sep 2013 03:01:58 +0000 (11:01 +0800)
Add the Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT for
ConnectivityManager.ACTION_CAPTIVE_PORTAL_TEST_COMPLETED) action, so
that we will not have the "FATAL EXCEPTION IN SYSTEM PROCESS:
CaptivePortalTracker" error which will cause many services died

Change-Id: I028c51384ee5bb93db6a0b904a4dfe974bf20fa5
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
core/java/android/net/CaptivePortalTracker.java

index 19c5f39..871fd13 100644 (file)
@@ -287,6 +287,7 @@ public class CaptivePortalTracker extends StateMachine {
                                     ConnectivityManager.ACTION_CAPTIVE_PORTAL_TEST_COMPLETED);
                             intent.putExtra(ConnectivityManager.EXTRA_IS_CAPTIVE_PORTAL, captive);
                             intent.setPackage(SETUP_WIZARD_PACKAGE);
+                            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
                             mContext.sendBroadcast(intent);
                         }