Loading core/java/android/security/advancedprotection/AdvancedProtectionManager.java +0 −5 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ import android.annotation.SystemService; import android.app.admin.DevicePolicyManager; import android.content.Context; import android.content.Intent; import android.net.wifi.WifiManager; import android.os.Binder; import android.os.RemoteException; import android.os.UserManager; Loading Loading @@ -98,7 +97,6 @@ public final class AdvancedProtectionManager { * Feature identifier for disallowing connections to Wi-Fi Wired Equivalent Privacy (WEP) * networks. * * @see WifiManager#isWepSupported() * @hide */ @SystemApi public static final int FEATURE_ID_DISALLOW_WEP = 3; Loading @@ -118,7 +116,6 @@ public final class AdvancedProtectionManager { FEATURE_ID_DISALLOW_CELLULAR_2G, FEATURE_ID_DISALLOW_INSTALL_UNKNOWN_SOURCES, FEATURE_ID_DISALLOW_USB, FEATURE_ID_DISALLOW_WEP, FEATURE_ID_ENABLE_MTE, }) @Retention(RetentionPolicy.SOURCE) Loading @@ -130,7 +127,6 @@ public final class AdvancedProtectionManager { case FEATURE_ID_DISALLOW_CELLULAR_2G -> "DISALLOW_CELLULAR_2G"; case FEATURE_ID_DISALLOW_INSTALL_UNKNOWN_SOURCES -> "DISALLOW_INSTALL_UNKNOWN_SOURCES"; case FEATURE_ID_DISALLOW_USB -> "DISALLOW_USB"; case FEATURE_ID_DISALLOW_WEP -> "DISALLOW_WEP"; case FEATURE_ID_ENABLE_MTE -> "ENABLE_MTE"; default -> "UNKNOWN"; }; Loading @@ -140,7 +136,6 @@ public final class AdvancedProtectionManager { FEATURE_ID_DISALLOW_CELLULAR_2G, FEATURE_ID_DISALLOW_INSTALL_UNKNOWN_SOURCES, FEATURE_ID_DISALLOW_USB, FEATURE_ID_DISALLOW_WEP, FEATURE_ID_ENABLE_MTE); /** Loading packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.kt +1 −22 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ import android.net.wifi.WifiManager import android.net.wifi.sharedconnectivity.app.NetworkProviderInfo import android.os.Bundle import android.os.SystemClock import android.security.advancedprotection.AdvancedProtectionManager import android.util.Log import android.view.WindowManager import androidx.annotation.VisibleForTesting Loading Loading @@ -501,18 +500,10 @@ open class WifiUtils { dialogWindowType: Int, onStartActivity: (intent: Intent) -> Unit, onAllowed: () -> Unit, onStartAapmActivity: (intent: Intent) -> Unit = onStartActivity, ): Job = coroutineScope.launch { val wifiManager = context.getSystemService(WifiManager::class.java) ?: return@launch val aapmManager = context.getSystemService(AdvancedProtectionManager::class.java) if (isAdvancedProtectionEnabled(aapmManager)) { val intent = AdvancedProtectionManager.createSupportIntent( AdvancedProtectionManager.FEATURE_ID_DISALLOW_WEP, AdvancedProtectionManager.SUPPORT_DIALOG_TYPE_BLOCKED_INTERACTION) intent.putExtra(DIALOG_WINDOW_TYPE, dialogWindowType) withContext(Dispatchers.Main) { onStartAapmActivity(intent) } } else if (wifiManager.isWepSupported == true && wifiManager.queryWepAllowed()) { if (wifiManager.isWepSupported == true && wifiManager.queryWepAllowed()) { withContext(Dispatchers.Main) { onAllowed() } } else { val intent = Intent(Intent.ACTION_MAIN).apply { Loading @@ -536,18 +527,6 @@ open class WifiUtils { } } private suspend fun isAdvancedProtectionEnabled( aapmManager: AdvancedProtectionManager? ): Boolean = if (android.security.Flags.aapmApi() && com.android.wifi.flags.Flags.wepDisabledInApm() && aapmManager != null ) { withContext(Dispatchers.Default) { aapmManager.isAdvancedProtectionEnabled() } } else { false } const val SSID = "ssid" const val DIALOG_WINDOW_TYPE = "dialog_window_type" } Loading packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetAdapter.java +0 −4 Original line number Diff line number Diff line Loading @@ -250,10 +250,6 @@ public class InternetAdapter extends RecyclerView.Adapter<InternetAdapter.Intern }, () -> { wifiConnect(wifiEntry, view); return null; }, intent -> { mInternetDetailsContentController .startActivityForDialogDismissDialogFirst(intent, view); return null; }); } return; Loading packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDetailsContentController.java +0 −11 Original line number Diff line number Diff line Loading @@ -875,17 +875,6 @@ public class InternetDetailsContentController implements AccessPointController.A mActivityStarter.startActivity(intent, false /* dismissShade */); } // Closes the dialog first, as the WEP dialog is in a different process and can have weird // interactions otherwise. void startActivityForDialogDismissDialogFirst(Intent intent, View view) { ActivityTransitionAnimator.Controller controller = mDialogTransitionAnimator.createActivityTransitionController(view); if (mCallback != null) { mCallback.dismissDialog(); } mActivityStarter.startActivity(intent, false /* dismissShade */, controller); } void launchNetworkSetting(View view) { startActivity(getSettingsIntent(), view); } Loading services/core/java/com/android/server/security/advancedprotection/AdvancedProtectionService.java +0 −5 Original line number Diff line number Diff line Loading @@ -64,7 +64,6 @@ import com.android.server.security.advancedprotection.features.AdvancedProtectio import com.android.server.security.advancedprotection.features.AdvancedProtectionProvider; import com.android.server.security.advancedprotection.features.DisallowCellular2GAdvancedProtectionHook; import com.android.server.security.advancedprotection.features.DisallowInstallUnknownSourcesAdvancedProtectionHook; import com.android.server.security.advancedprotection.features.DisallowWepAdvancedProtectionProvider; import com.android.server.security.advancedprotection.features.MemoryTaggingExtensionHook; import com.android.server.security.advancedprotection.features.UsbDataAdvancedProtectionHook; Loading Loading @@ -143,8 +142,6 @@ public class AdvancedProtectionService extends IAdvancedProtectionService.Stub { Slog.e(TAG, "Failed to initialize UsbDataAdvancedProtection", e); } } mProviders.add(new DisallowWepAdvancedProtectionProvider()); } private void initLogging() { Loading Loading @@ -303,8 +300,6 @@ public class AdvancedProtectionService extends IAdvancedProtectionService.Stub { return AdvancedProtectionProtoEnums.FEATURE_ID_DISALLOW_INSTALL_UNKNOWN_SOURCES; case AdvancedProtectionManager.FEATURE_ID_DISALLOW_USB: return AdvancedProtectionProtoEnums.FEATURE_ID_DISALLOW_USB; case AdvancedProtectionManager.FEATURE_ID_DISALLOW_WEP: return AdvancedProtectionProtoEnums.FEATURE_ID_DISALLOW_WEP; case AdvancedProtectionManager.FEATURE_ID_ENABLE_MTE: return AdvancedProtectionProtoEnums.FEATURE_ID_ENABLE_MTE; default: Loading Loading
core/java/android/security/advancedprotection/AdvancedProtectionManager.java +0 −5 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ import android.annotation.SystemService; import android.app.admin.DevicePolicyManager; import android.content.Context; import android.content.Intent; import android.net.wifi.WifiManager; import android.os.Binder; import android.os.RemoteException; import android.os.UserManager; Loading Loading @@ -98,7 +97,6 @@ public final class AdvancedProtectionManager { * Feature identifier for disallowing connections to Wi-Fi Wired Equivalent Privacy (WEP) * networks. * * @see WifiManager#isWepSupported() * @hide */ @SystemApi public static final int FEATURE_ID_DISALLOW_WEP = 3; Loading @@ -118,7 +116,6 @@ public final class AdvancedProtectionManager { FEATURE_ID_DISALLOW_CELLULAR_2G, FEATURE_ID_DISALLOW_INSTALL_UNKNOWN_SOURCES, FEATURE_ID_DISALLOW_USB, FEATURE_ID_DISALLOW_WEP, FEATURE_ID_ENABLE_MTE, }) @Retention(RetentionPolicy.SOURCE) Loading @@ -130,7 +127,6 @@ public final class AdvancedProtectionManager { case FEATURE_ID_DISALLOW_CELLULAR_2G -> "DISALLOW_CELLULAR_2G"; case FEATURE_ID_DISALLOW_INSTALL_UNKNOWN_SOURCES -> "DISALLOW_INSTALL_UNKNOWN_SOURCES"; case FEATURE_ID_DISALLOW_USB -> "DISALLOW_USB"; case FEATURE_ID_DISALLOW_WEP -> "DISALLOW_WEP"; case FEATURE_ID_ENABLE_MTE -> "ENABLE_MTE"; default -> "UNKNOWN"; }; Loading @@ -140,7 +136,6 @@ public final class AdvancedProtectionManager { FEATURE_ID_DISALLOW_CELLULAR_2G, FEATURE_ID_DISALLOW_INSTALL_UNKNOWN_SOURCES, FEATURE_ID_DISALLOW_USB, FEATURE_ID_DISALLOW_WEP, FEATURE_ID_ENABLE_MTE); /** Loading
packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.kt +1 −22 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ import android.net.wifi.WifiManager import android.net.wifi.sharedconnectivity.app.NetworkProviderInfo import android.os.Bundle import android.os.SystemClock import android.security.advancedprotection.AdvancedProtectionManager import android.util.Log import android.view.WindowManager import androidx.annotation.VisibleForTesting Loading Loading @@ -501,18 +500,10 @@ open class WifiUtils { dialogWindowType: Int, onStartActivity: (intent: Intent) -> Unit, onAllowed: () -> Unit, onStartAapmActivity: (intent: Intent) -> Unit = onStartActivity, ): Job = coroutineScope.launch { val wifiManager = context.getSystemService(WifiManager::class.java) ?: return@launch val aapmManager = context.getSystemService(AdvancedProtectionManager::class.java) if (isAdvancedProtectionEnabled(aapmManager)) { val intent = AdvancedProtectionManager.createSupportIntent( AdvancedProtectionManager.FEATURE_ID_DISALLOW_WEP, AdvancedProtectionManager.SUPPORT_DIALOG_TYPE_BLOCKED_INTERACTION) intent.putExtra(DIALOG_WINDOW_TYPE, dialogWindowType) withContext(Dispatchers.Main) { onStartAapmActivity(intent) } } else if (wifiManager.isWepSupported == true && wifiManager.queryWepAllowed()) { if (wifiManager.isWepSupported == true && wifiManager.queryWepAllowed()) { withContext(Dispatchers.Main) { onAllowed() } } else { val intent = Intent(Intent.ACTION_MAIN).apply { Loading @@ -536,18 +527,6 @@ open class WifiUtils { } } private suspend fun isAdvancedProtectionEnabled( aapmManager: AdvancedProtectionManager? ): Boolean = if (android.security.Flags.aapmApi() && com.android.wifi.flags.Flags.wepDisabledInApm() && aapmManager != null ) { withContext(Dispatchers.Default) { aapmManager.isAdvancedProtectionEnabled() } } else { false } const val SSID = "ssid" const val DIALOG_WINDOW_TYPE = "dialog_window_type" } Loading
packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetAdapter.java +0 −4 Original line number Diff line number Diff line Loading @@ -250,10 +250,6 @@ public class InternetAdapter extends RecyclerView.Adapter<InternetAdapter.Intern }, () -> { wifiConnect(wifiEntry, view); return null; }, intent -> { mInternetDetailsContentController .startActivityForDialogDismissDialogFirst(intent, view); return null; }); } return; Loading
packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDetailsContentController.java +0 −11 Original line number Diff line number Diff line Loading @@ -875,17 +875,6 @@ public class InternetDetailsContentController implements AccessPointController.A mActivityStarter.startActivity(intent, false /* dismissShade */); } // Closes the dialog first, as the WEP dialog is in a different process and can have weird // interactions otherwise. void startActivityForDialogDismissDialogFirst(Intent intent, View view) { ActivityTransitionAnimator.Controller controller = mDialogTransitionAnimator.createActivityTransitionController(view); if (mCallback != null) { mCallback.dismissDialog(); } mActivityStarter.startActivity(intent, false /* dismissShade */, controller); } void launchNetworkSetting(View view) { startActivity(getSettingsIntent(), view); } Loading
services/core/java/com/android/server/security/advancedprotection/AdvancedProtectionService.java +0 −5 Original line number Diff line number Diff line Loading @@ -64,7 +64,6 @@ import com.android.server.security.advancedprotection.features.AdvancedProtectio import com.android.server.security.advancedprotection.features.AdvancedProtectionProvider; import com.android.server.security.advancedprotection.features.DisallowCellular2GAdvancedProtectionHook; import com.android.server.security.advancedprotection.features.DisallowInstallUnknownSourcesAdvancedProtectionHook; import com.android.server.security.advancedprotection.features.DisallowWepAdvancedProtectionProvider; import com.android.server.security.advancedprotection.features.MemoryTaggingExtensionHook; import com.android.server.security.advancedprotection.features.UsbDataAdvancedProtectionHook; Loading Loading @@ -143,8 +142,6 @@ public class AdvancedProtectionService extends IAdvancedProtectionService.Stub { Slog.e(TAG, "Failed to initialize UsbDataAdvancedProtection", e); } } mProviders.add(new DisallowWepAdvancedProtectionProvider()); } private void initLogging() { Loading Loading @@ -303,8 +300,6 @@ public class AdvancedProtectionService extends IAdvancedProtectionService.Stub { return AdvancedProtectionProtoEnums.FEATURE_ID_DISALLOW_INSTALL_UNKNOWN_SOURCES; case AdvancedProtectionManager.FEATURE_ID_DISALLOW_USB: return AdvancedProtectionProtoEnums.FEATURE_ID_DISALLOW_USB; case AdvancedProtectionManager.FEATURE_ID_DISALLOW_WEP: return AdvancedProtectionProtoEnums.FEATURE_ID_DISALLOW_WEP; case AdvancedProtectionManager.FEATURE_ID_ENABLE_MTE: return AdvancedProtectionProtoEnums.FEATURE_ID_ENABLE_MTE; default: Loading