DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev"
Bug: 64864568 This reverts commit fd35d7c0a284e31231e2f424cade864be695965b, reversing changes made to 07a21754f45672b27e765d8c7677c9663c6dce91.
This commit is contained in:
@@ -39,7 +39,9 @@ import android.content.ContentResolver;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
|
import android.content.res.Resources;
|
||||||
import android.database.ContentObserver;
|
import android.database.ContentObserver;
|
||||||
import android.net.ConnectivityManager;
|
import android.net.ConnectivityManager;
|
||||||
import android.net.ConnectivityManager.PacketKeepalive;
|
import android.net.ConnectivityManager.PacketKeepalive;
|
||||||
@@ -98,6 +100,7 @@ import android.text.TextUtils;
|
|||||||
import android.util.LocalLog;
|
import android.util.LocalLog;
|
||||||
import android.util.LocalLog.ReadOnlyLocalLog;
|
import android.util.LocalLog.ReadOnlyLocalLog;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.util.Pair;
|
||||||
import android.util.Slog;
|
import android.util.Slog;
|
||||||
import android.util.SparseArray;
|
import android.util.SparseArray;
|
||||||
import android.util.SparseBooleanArray;
|
import android.util.SparseBooleanArray;
|
||||||
@@ -119,6 +122,7 @@ import com.android.internal.util.IndentingPrintWriter;
|
|||||||
import com.android.internal.util.MessageUtils;
|
import com.android.internal.util.MessageUtils;
|
||||||
import com.android.internal.util.WakeupMessage;
|
import com.android.internal.util.WakeupMessage;
|
||||||
import com.android.internal.util.XmlUtils;
|
import com.android.internal.util.XmlUtils;
|
||||||
|
import com.android.server.LocalServices;
|
||||||
import com.android.server.am.BatteryStatsService;
|
import com.android.server.am.BatteryStatsService;
|
||||||
import com.android.server.connectivity.DataConnectionStats;
|
import com.android.server.connectivity.DataConnectionStats;
|
||||||
import com.android.server.connectivity.KeepaliveTracker;
|
import com.android.server.connectivity.KeepaliveTracker;
|
||||||
@@ -380,11 +384,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
*/
|
*/
|
||||||
private static final int EVENT_REGISTER_NETWORK_LISTENER_WITH_INTENT = 31;
|
private static final int EVENT_REGISTER_NETWORK_LISTENER_WITH_INTENT = 31;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private static final int EVENT_CONFIGURE_NET_TRANSITION_WAKELOCK_OVERRIDE = 32;
|
|
||||||
|
|
||||||
/** Handler thread used for both of the handlers below. */
|
/** Handler thread used for both of the handlers below. */
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
protected final HandlerThread mHandlerThread;
|
protected final HandlerThread mHandlerThread;
|
||||||
@@ -879,23 +878,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateNetTransitionWakelockOverride() {
|
|
||||||
int override = Settings.Global.getInt(
|
|
||||||
mContext.getContentResolver(),
|
|
||||||
Settings.Global.NET_TRANSITION_WAKELOCK_OVERRIDE_MS,
|
|
||||||
-1);
|
|
||||||
if (override >= 0) {
|
|
||||||
mNetTransitionWakeLockTimeout = override;
|
|
||||||
if (DBG) log("mNetTransitionWakeLockTimeout overridden to " +
|
|
||||||
mNetTransitionWakeLockTimeout + " ms");
|
|
||||||
} else {
|
|
||||||
mNetTransitionWakeLockTimeout = mContext.getResources().getInteger(
|
|
||||||
com.android.internal.R.integer.config_networkTransitionTimeout);
|
|
||||||
if (DBG) log("mNetTransitionWakeLockTimeout configured to " +
|
|
||||||
mNetTransitionWakeLockTimeout + " ms");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void registerSettingsCallbacks() {
|
private void registerSettingsCallbacks() {
|
||||||
// Watch for global HTTP proxy changes.
|
// Watch for global HTTP proxy changes.
|
||||||
mSettingsObserver.observe(
|
mSettingsObserver.observe(
|
||||||
@@ -906,11 +888,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
mSettingsObserver.observe(
|
mSettingsObserver.observe(
|
||||||
Settings.Global.getUriFor(Settings.Global.MOBILE_DATA_ALWAYS_ON),
|
Settings.Global.getUriFor(Settings.Global.MOBILE_DATA_ALWAYS_ON),
|
||||||
EVENT_CONFIGURE_MOBILE_DATA_ALWAYS_ON);
|
EVENT_CONFIGURE_MOBILE_DATA_ALWAYS_ON);
|
||||||
|
|
||||||
// Watch for changes to the override of the net transition wakelock duration.
|
|
||||||
mSettingsObserver.observe(
|
|
||||||
Settings.Global.getUriFor(Settings.Global.NET_TRANSITION_WAKELOCK_OVERRIDE_MS),
|
|
||||||
EVENT_CONFIGURE_NET_TRANSITION_WAKELOCK_OVERRIDE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized int nextNetworkRequestId() {
|
private synchronized int nextNetworkRequestId() {
|
||||||
@@ -1661,9 +1638,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
// Configure whether mobile data is always on.
|
// Configure whether mobile data is always on.
|
||||||
mHandler.sendMessage(mHandler.obtainMessage(EVENT_CONFIGURE_MOBILE_DATA_ALWAYS_ON));
|
mHandler.sendMessage(mHandler.obtainMessage(EVENT_CONFIGURE_MOBILE_DATA_ALWAYS_ON));
|
||||||
|
|
||||||
mHandler.sendMessage(
|
|
||||||
mHandler.obtainMessage(EVENT_CONFIGURE_NET_TRANSITION_WAKELOCK_OVERRIDE));
|
|
||||||
|
|
||||||
mHandler.sendMessage(mHandler.obtainMessage(EVENT_SYSTEM_READY));
|
mHandler.sendMessage(mHandler.obtainMessage(EVENT_SYSTEM_READY));
|
||||||
|
|
||||||
mPermissionMonitor.startMonitoring();
|
mPermissionMonitor.startMonitoring();
|
||||||
@@ -2877,10 +2851,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
handleMobileDataAlwaysOn();
|
handleMobileDataAlwaysOn();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EVENT_CONFIGURE_NET_TRANSITION_WAKELOCK_OVERRIDE: {
|
|
||||||
updateNetTransitionWakelockOverride();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
// Sent by KeepaliveTracker to process an app request on the state machine thread.
|
// Sent by KeepaliveTracker to process an app request on the state machine thread.
|
||||||
case NetworkAgent.CMD_START_PACKET_KEEPALIVE: {
|
case NetworkAgent.CMD_START_PACKET_KEEPALIVE: {
|
||||||
mKeepaliveTracker.handleStartKeepalive(msg);
|
mKeepaliveTracker.handleStartKeepalive(msg);
|
||||||
@@ -3053,10 +3023,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
// becomes CONNECTED, whichever happens first. The timer is started by the
|
// becomes CONNECTED, whichever happens first. The timer is started by the
|
||||||
// first caller and not restarted by subsequent callers.
|
// first caller and not restarted by subsequent callers.
|
||||||
private void requestNetworkTransitionWakelock(String forWhom) {
|
private void requestNetworkTransitionWakelock(String forWhom) {
|
||||||
if (mNetTransitionWakeLockTimeout <= 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int serialNum = 0;
|
int serialNum = 0;
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
if (mNetTransitionWakeLock.isHeld()) return;
|
if (mNetTransitionWakeLock.isHeld()) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user