Loading packages/Tethering/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ <!-- Permissions must be defined here, and not in the base manifest, as the tethering running in the system server process does not need any permission, and having privileged permissions added would cause crashes on startup unless they are also added to the privileged permissions whitelist for that package. --> added to the privileged permissions allowlist for that package. --> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED" /> Loading packages/Tethering/proguard.flags +1 −1 Original line number Diff line number Diff line # Keep class's integer static field for MessageUtils to parsing their name. -keep class com.android.networkstack.tethering.Tethering$TetherMasterSM { -keep class com.android.networkstack.tethering.Tethering$TetherMainSM { static final int CMD_*; static final int EVENT_*; } Loading packages/Tethering/src/android/net/ip/IpServer.java +10 −6 Original line number Diff line number Diff line Loading @@ -196,15 +196,19 @@ public class IpServer extends StateMachine { public static final int CMD_TETHER_UNREQUESTED = BASE_IPSERVER + 2; // notification that this interface is down public static final int CMD_INTERFACE_DOWN = BASE_IPSERVER + 3; // notification from the master SM that it had trouble enabling IP Forwarding // notification from the {@link Tethering.TetherMainSM} that it had trouble enabling IP // Forwarding public static final int CMD_IP_FORWARDING_ENABLE_ERROR = BASE_IPSERVER + 4; // notification from the master SM that it had trouble disabling IP Forwarding // notification from the {@link Tethering.TetherMainSM} SM that it had trouble disabling IP // Forwarding public static final int CMD_IP_FORWARDING_DISABLE_ERROR = BASE_IPSERVER + 5; // notification from the master SM that it had trouble starting tethering // notification from the {@link Tethering.TetherMainSM} SM that it had trouble starting // tethering public static final int CMD_START_TETHERING_ERROR = BASE_IPSERVER + 6; // notification from the master SM that it had trouble stopping tethering // notification from the {@link Tethering.TetherMainSM} that it had trouble stopping tethering public static final int CMD_STOP_TETHERING_ERROR = BASE_IPSERVER + 7; // notification from the master SM that it had trouble setting the DNS forwarders // notification from the {@link Tethering.TetherMainSM} that it had trouble setting the DNS // forwarders public static final int CMD_SET_DNS_FORWARDERS_ERROR = BASE_IPSERVER + 8; // the upstream connection has changed public static final int CMD_TETHER_CONNECTION_CHANGED = BASE_IPSERVER + 9; Loading Loading @@ -1319,7 +1323,7 @@ public class IpServer extends StateMachine { /** * This state is terminal for the per interface state machine. At this * point, the master state machine should have removed this interface * point, the tethering main state machine should have removed this interface * specific state machine from its list of possible recipients of * tethering requests. The state machine itself will hang around until * the garbage collector finds it. Loading packages/Tethering/src/android/net/util/TetheringMessageBase.java +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ package android.net.util; * This class defines Message.what base addresses for various state machine. */ public class TetheringMessageBase { public static final int BASE_MASTER = 0; public static final int BASE_MAIN_SM = 0; public static final int BASE_IPSERVER = 100; } packages/Tethering/src/com/android/networkstack/tethering/EntitlementManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -296,16 +296,16 @@ public class EntitlementManager { * Reference TetheringManager.TETHERING_{@code *} for each tether type. * * @param config an object that encapsulates the various tethering configuration elements. * Note: this method is only called from TetherMaster on the handler thread. * Note: this method is only called from @{link Tethering.TetherMainSM} on the handler thread. * If there are new callers from different threads, the logic should move to * masterHandler to avoid race conditions. * @{link Tethering.TetherMainSM} handler to avoid race conditions. */ public void reevaluateSimCardProvisioning(final TetheringConfiguration config) { if (DBG) mLog.i("reevaluateSimCardProvisioning"); if (!mHandler.getLooper().isCurrentThread()) { // Except for test, this log should not appear in normal flow. mLog.log("reevaluateSimCardProvisioning() don't run in TetherMaster thread"); mLog.log("reevaluateSimCardProvisioning() don't run in TetherMainSM thread"); } mEntitlementCacheValue.clear(); mCurrentEntitlementResults.clear(); Loading Loading
packages/Tethering/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ <!-- Permissions must be defined here, and not in the base manifest, as the tethering running in the system server process does not need any permission, and having privileged permissions added would cause crashes on startup unless they are also added to the privileged permissions whitelist for that package. --> added to the privileged permissions allowlist for that package. --> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED" /> Loading
packages/Tethering/proguard.flags +1 −1 Original line number Diff line number Diff line # Keep class's integer static field for MessageUtils to parsing their name. -keep class com.android.networkstack.tethering.Tethering$TetherMasterSM { -keep class com.android.networkstack.tethering.Tethering$TetherMainSM { static final int CMD_*; static final int EVENT_*; } Loading
packages/Tethering/src/android/net/ip/IpServer.java +10 −6 Original line number Diff line number Diff line Loading @@ -196,15 +196,19 @@ public class IpServer extends StateMachine { public static final int CMD_TETHER_UNREQUESTED = BASE_IPSERVER + 2; // notification that this interface is down public static final int CMD_INTERFACE_DOWN = BASE_IPSERVER + 3; // notification from the master SM that it had trouble enabling IP Forwarding // notification from the {@link Tethering.TetherMainSM} that it had trouble enabling IP // Forwarding public static final int CMD_IP_FORWARDING_ENABLE_ERROR = BASE_IPSERVER + 4; // notification from the master SM that it had trouble disabling IP Forwarding // notification from the {@link Tethering.TetherMainSM} SM that it had trouble disabling IP // Forwarding public static final int CMD_IP_FORWARDING_DISABLE_ERROR = BASE_IPSERVER + 5; // notification from the master SM that it had trouble starting tethering // notification from the {@link Tethering.TetherMainSM} SM that it had trouble starting // tethering public static final int CMD_START_TETHERING_ERROR = BASE_IPSERVER + 6; // notification from the master SM that it had trouble stopping tethering // notification from the {@link Tethering.TetherMainSM} that it had trouble stopping tethering public static final int CMD_STOP_TETHERING_ERROR = BASE_IPSERVER + 7; // notification from the master SM that it had trouble setting the DNS forwarders // notification from the {@link Tethering.TetherMainSM} that it had trouble setting the DNS // forwarders public static final int CMD_SET_DNS_FORWARDERS_ERROR = BASE_IPSERVER + 8; // the upstream connection has changed public static final int CMD_TETHER_CONNECTION_CHANGED = BASE_IPSERVER + 9; Loading Loading @@ -1319,7 +1323,7 @@ public class IpServer extends StateMachine { /** * This state is terminal for the per interface state machine. At this * point, the master state machine should have removed this interface * point, the tethering main state machine should have removed this interface * specific state machine from its list of possible recipients of * tethering requests. The state machine itself will hang around until * the garbage collector finds it. Loading
packages/Tethering/src/android/net/util/TetheringMessageBase.java +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ package android.net.util; * This class defines Message.what base addresses for various state machine. */ public class TetheringMessageBase { public static final int BASE_MASTER = 0; public static final int BASE_MAIN_SM = 0; public static final int BASE_IPSERVER = 100; }
packages/Tethering/src/com/android/networkstack/tethering/EntitlementManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -296,16 +296,16 @@ public class EntitlementManager { * Reference TetheringManager.TETHERING_{@code *} for each tether type. * * @param config an object that encapsulates the various tethering configuration elements. * Note: this method is only called from TetherMaster on the handler thread. * Note: this method is only called from @{link Tethering.TetherMainSM} on the handler thread. * If there are new callers from different threads, the logic should move to * masterHandler to avoid race conditions. * @{link Tethering.TetherMainSM} handler to avoid race conditions. */ public void reevaluateSimCardProvisioning(final TetheringConfiguration config) { if (DBG) mLog.i("reevaluateSimCardProvisioning"); if (!mHandler.getLooper().isCurrentThread()) { // Except for test, this log should not appear in normal flow. mLog.log("reevaluateSimCardProvisioning() don't run in TetherMaster thread"); mLog.log("reevaluateSimCardProvisioning() don't run in TetherMainSM thread"); } mEntitlementCacheValue.clear(); mCurrentEntitlementResults.clear(); Loading