resolved conflicts for merge of 6ea0082b to master
Change-Id: I8ec28728c12d7cc3ce2c4f3d09d9ce6162504618
This commit is contained in:
@@ -5320,9 +5320,19 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
||||
setAlarm(samplingIntervalInSeconds * 1000, mSampleIntervalElapsedIntent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a network sampling alarm.
|
||||
*/
|
||||
void setAlarm(int timeoutInMilliseconds, PendingIntent intent) {
|
||||
long wakeupTime = SystemClock.elapsedRealtime() + timeoutInMilliseconds;
|
||||
mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, wakeupTime, intent);
|
||||
int alarmType;
|
||||
if (Resources.getSystem().getBoolean(
|
||||
R.bool.config_networkSamplingWakesDevice)) {
|
||||
alarmType = AlarmManager.ELAPSED_REALTIME_WAKEUP;
|
||||
} else {
|
||||
alarmType = AlarmManager.ELAPSED_REALTIME;
|
||||
}
|
||||
mAlarmManager.set(alarmType, wakeupTime, intent);
|
||||
}
|
||||
|
||||
private final HashMap<Messenger, NetworkFactoryInfo> mNetworkFactoryInfos =
|
||||
|
||||
Reference in New Issue
Block a user