From 6e0af2ced5366f8dcad49fa3810337ce923a2f41 Mon Sep 17 00:00:00 2001 From: Jan Nordqvist Date: Tue, 22 Sep 2015 15:54:32 -0700 Subject: [PATCH 1/3] DO NOT MERGE Hotspot 2.0 relase 2 first cut. CP mods to take a URL as a parameter, and new ScanInfo object. Cherry-picked from 032e26721254cfdc2bdedbc592662730128807dd Change-Id: Idbb2d4751c575ba07a56942771e2b2955b624635 --- core/java/android/net/ConnectivityManager.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index 4d9b759eea..ad9058f35d 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -208,6 +208,12 @@ public class ConnectivityManager { * {@link android.content.Intent#getParcelableExtra(String)}. */ public static final String EXTRA_CAPTIVE_PORTAL = "android.net.extra.CAPTIVE_PORTAL"; + + /** + * Key for passing a URL to the captive portal login activity. + */ + public static final String EXTRA_CAPTIVE_PORTAL_URL = "android.net.extra.CAPTIVE_PORTAL_URL"; + /** * Broadcast action to indicate the change of data activity status * (idle or active) on a network in a recent period. From 98048cdb2b612ef9dab68557fd3c21c2e8ea5ad0 Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Thu, 1 Oct 2015 10:24:31 -0700 Subject: [PATCH 2/3] DO NOT MERGE Introduce direct listener API for alarm delivery The Alarm Manager now supports a set() variant that takes a listener callback to invoke at alarm trigger time rather than a PendingIntent. This is much lower overhead and has guaranteed low delivery latency from the trigger time. The tradeoff is that the app must be running *continuously* from the time the alarm is set to the time it is delivered. If the app exits for any reason before the alarm fires, the listener becomes invalid and the alarm will be dropped. This is more or less equivalent to setting an alarm with a broadcast PendingIntent that matches only a runtime-registered receiver. The app's alarm listener can be any object that implements the new AlarmManager.OnAlarmListener interface and implements its onAlarm() method. There is no data delivered at alarm trigger time: whatever state needs to be associated with the specific alarm instance should simply be packaged inside the OnAlarmListener instance. An alarm using OnAlarmListener can request that the onAlarm() method be called on an arbitrary handler. If the program passes 'null' for this parameter when setting the alarm, the callback occurs on the application's main Looper thread. Cherry-picked from a75b36178d8caa471520481412f3e09998f09b7d Bug 20157436 Change-Id: I2eb030a24efdd466a2eee1666c5231201b43684b --- .../src/com/android/server/NetworkStatsServiceTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/services/tests/servicestests/src/com/android/server/NetworkStatsServiceTest.java b/services/tests/servicestests/src/com/android/server/NetworkStatsServiceTest.java index 90b4f43c8e..c12f978d02 100644 --- a/services/tests/servicestests/src/com/android/server/NetworkStatsServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/NetworkStatsServiceTest.java @@ -876,11 +876,12 @@ public class NetworkStatsServiceTest extends AndroidTestCase { } private void expectSystemReady() throws Exception { - mAlarmManager.remove(isA(PendingIntent.class)); + mAlarmManager.remove(isA(PendingIntent.class), null); expectLastCall().anyTimes(); - mAlarmManager.set(eq(AlarmManager.ELAPSED_REALTIME), anyLong(), anyLong(), anyLong(), - anyInt(), isA(PendingIntent.class), isA(WorkSource.class), + mAlarmManager.set(getContext().getPackageName(), + eq(AlarmManager.ELAPSED_REALTIME), anyLong(), anyLong(), anyLong(), + anyInt(), isA(PendingIntent.class), null, null, isA(WorkSource.class), isA(AlarmManager.AlarmClockInfo.class)); expectLastCall().atLeastOnce(); From d64c967d37cef184fc9f699f8ba0c9d79d2a12e2 Mon Sep 17 00:00:00 2001 From: Baligh Uddin Date: Sun, 13 Dec 2015 18:01:17 +0000 Subject: [PATCH 3/3] empty commit to trigger build Change-Id: I3ec926126a0d9ee7d64ffc70ca7aa7c6c9e2a9c6