| Chunk |
|---|
| Conflicting content |
|---|
private static PowerManager.WakeLock sWakeLock;
* The icon to show in the 'available networks' notification. This will also
* be the ID of the Notification given to the NotificationManager.
*/
<<<<<<< HEAD
private static final int ICON_NETWORKS_AVAILABLE =
com.android.internal.R.drawable.stat_notify_wifi_in_range;
/**
* When a notification is shown, we wait this amount before possibly showing it again.
=======
private static final int DEFAULT_WAKELOCK_TIMEOUT = 8000;
// Wake lock used by driver-stop operation
private static PowerManager.WakeLock sDriverStopWakeLock;
// Wake lock used by other operations
private static final int MESSAGE_ENABLE_WIFI = 0;
private static final int MESSAGE_DISABLE_WIFI = 1;
private static final int MESSAGE_STOP_WIFI = 2;
private static final int MESSAGE_START_WIFI = 3;
private static final int MESSAGE_RELEASE_WAKELOCK = 4;
private static final int MESSAGE_UPDATE_STATE = 5;
private static final int MESSAGE_START_ACCESS_POINT = 6;
private static final int MESSAGE_STOP_ACCESS_POINT = 7;
private static final int MESSAGE_SET_CHANNELS = 8;
private static final int MESSAGE_ENABLE_NETWORKS = 9;
private static final int MESSAGE_START_SCAN = 10;
private static final int MESSAGE_REPORT_WORKSOURCE = 11;
private static final int MESSAGE_ENABLE_RSSI_POLLING = 12;
private final WifiHandler mWifiHandler;
/*
* Cache of scan results objects (size is somewhat arbitrary)
>>>>>>> f38b709e470849943befbe88a0daeb7324f5114b
*/
private final long NOTIFICATION_REPEAT_DELAY_MS;
/** |
| Solution content |
|---|
* The icon to show in the 'available networks' notification. This will also
* be the ID of the Notification given to the NotificationManager.
*/
private static final int ICON_NETWORKS_AVAILABLE =
com.android.internal.R.drawable.stat_notify_wifi_in_range;
/**
* When a notification is shown, we wait this amount before possibly showing it again.
*/
private final long NOTIFICATION_REPEAT_DELAY_MS;
/** |
| File |
|---|
| WifiService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
mScreenOff = false;
// Once the screen is on, we are not keeping WIFI running
// because of any locks so clear that tracking immediately.
<<<<<<< HEAD
reportStartWorkSource();
mWifiStateMachine.enableRssiPolling(true);
updateWifiState();
=======
sendReportWorkSourceMessage();
sendEnableRssiPollingMessage(true);
/* DHCP or other temporary failures in the past can prevent
* a disabled network from being connected to, enable on screen on
*/
if (mWifiStateTracker.isAnyNetworkDisabled()) {
sendEnableNetworksMessage();
}
>>>>>>> f38b709e470849943befbe88a0daeb7324f5114b
} else if (action.equals(Intent.ACTION_SCREEN_OFF)) {
if (DBG) {
Slog.d(TAG, "ACTION_SCREEN_OFF"); |
| Solution content |
|---|
mScreenOff = false;
// Once the screen is on, we are not keeping WIFI running
// because of any locks so clear that tracking immediately.
reportStartWorkSource();
mWifiStateMachine.enableRssiPolling(true);
updateWifiState();
} else if (action.equals(Intent.ACTION_SCREEN_OFF)) {
if (DBG) {
Slog.d(TAG, "ACTION_SCREEN_OFF"); |
| File |
|---|
| WifiService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
Slog.d(TAG, "ACTION_SCREEN_OFF");
}
mScreenOff = true;
<<<<<<< HEAD
mWifiStateMachine.enableRssiPolling(false);
=======
sendEnableRssiPollingMessage(false);
>>>>>>> f38b709e470849943befbe88a0daeb7324f5114b
/*
* Set a timer to put Wi-Fi to sleep, but only if the screen is off
* AND the "stay on while plugged in" setting doesn't match the |
| Solution content |
|---|
Slog.d(TAG, "ACTION_SCREEN_OFF");
}
mScreenOff = true;
mWifiStateMachine.enableRssiPolling(false);
/*
* Set a timer to put Wi-Fi to sleep, but only if the screen is off
* AND the "stay on while plugged in" setting doesn't match the |
| File |
|---|
| WifiService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
Slog.d(TAG, "got ACTION_DEVICE_IDLE");
}
mDeviceIdle = true;
<<<<<<< HEAD
reportStartWorkSource();
updateWifiState();
=======
sendReportWorkSourceMessage();
>>>>>>> f38b709e470849943befbe88a0daeb7324f5114b
} else if (action.equals(Intent.ACTION_BATTERY_CHANGED)) {
/*
* Set a timer to put Wi-Fi to sleep, but only if the screen is off |
| Solution content |
|---|
Slog.d(TAG, "got ACTION_DEVICE_IDLE");
}
mDeviceIdle = true;
reportStartWorkSource();
updateWifiState();
} else if (action.equals(Intent.ACTION_BATTERY_CHANGED)) {
/*
* Set a timer to put Wi-Fi to sleep, but only if the screen is off |
| File |
|---|
| WifiService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
};
<<<<<<< HEAD
private synchronized void reportStartWorkSource() {
mTmpWorkSource.clear();
if (mDeviceIdle) {
for (int i=0; i |
| Solution content |
|---|
}
};
private synchronized void reportStartWorkSource() {
mTmpWorkSource.clear();
if (mDeviceIdle) {
for (int i=0; i |
| File |
|---|
| WifiService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| For statement |
| If statement |
| Method declaration |
| Method invocation |
| Method signature |
| Synchronized statement |
| Chunk |
|---|
| Conflicting content |
|---|
break;
Settings.System.AIRPLANE_MODE_ON, 0) == 1;
}
<<<<<<< HEAD
=======
/**
* Handler that allows posting to the WifiThread.
*/
private class WifiHandler extends Handler {
public WifiHandler(Looper looper) {
super(looper);
}
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case MESSAGE_ENABLE_WIFI:
setWifiEnabledBlocking(true, msg.arg1 == 1, msg.arg2);
if (mWifiWatchdogService == null) {
mWifiWatchdogService = new WifiWatchdogService(mContext, mWifiStateTracker);
}
sWakeLock.release();
break;
case MESSAGE_START_WIFI:
reportStartWorkSource();
mWifiStateTracker.setScanOnlyMode(msg.arg1 == WifiManager.WIFI_MODE_SCAN_ONLY);
mWifiStateTracker.restart();
mWifiStateTracker.setHighPerfMode(msg.arg1 ==
WifiManager.WIFI_MODE_FULL_HIGH_PERF);
sWakeLock.release();
break;
case MESSAGE_UPDATE_STATE:
doUpdateWifiState();
break;
case MESSAGE_DISABLE_WIFI:
// a non-zero msg.arg1 value means the "enabled" setting
// should be persisted
setWifiEnabledBlocking(false, msg.arg1 == 1, msg.arg2);
mWifiWatchdogService = null;
sWakeLock.release();
break;
case MESSAGE_STOP_WIFI:
mWifiStateTracker.disconnectAndStop();
// don't release wakelock
break;
case MESSAGE_RELEASE_WAKELOCK:
sDriverStopWakeLock.release();
break;
case MESSAGE_START_ACCESS_POINT:
setWifiApEnabledBlocking(true,
msg.arg1,
(WifiConfiguration) msg.obj);
sWakeLock.release();
break;
case MESSAGE_STOP_ACCESS_POINT:
setWifiApEnabledBlocking(false,
msg.arg1,
(WifiConfiguration) msg.obj);
sWakeLock.release();
case MESSAGE_SET_CHANNELS:
setNumAllowedChannelsBlocking(msg.arg1, msg.arg2 == 1);
break;
case MESSAGE_ENABLE_NETWORKS:
mWifiStateTracker.enableAllNetworks(getConfiguredNetworks());
break;
case MESSAGE_START_SCAN:
boolean forceActive = (msg.arg1 == 1);
switch (mWifiStateTracker.getSupplicantState()) {
case DISCONNECTED:
case INACTIVE:
case SCANNING:
case DORMANT:
break;
default:
mWifiStateTracker.setScanResultHandling(
WifiStateTracker.SUPPL_SCAN_HANDLING_LIST_ONLY);
break;
}
mWifiStateTracker.scan(forceActive);
break;
case MESSAGE_REPORT_WORKSOURCE:
reportStartWorkSource();
break;
case MESSAGE_ENABLE_RSSI_POLLING:
mWifiStateTracker.enableRssiPolling(msg.arg1 == 1);
break;
}
}
}
>>>>>>> f38b709e470849943befbe88a0daeb7324f5114b
@Override
protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP) |
| Solution content |
|---|
Settings.System.AIRPLANE_MODE_ON, 0) == 1;
}
@Override
protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP) |
| File |
|---|
| WifiService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Class declaration |
| Comment |