From eb19d4ba5996e2f4248c1853177460a2439f1642 Mon Sep 17 00:00:00 2001 From: Zoey Chen Date: Sat, 16 Oct 2021 01:02:58 +0800 Subject: [PATCH] [Foldable] Show full screen "Install Certificates" for large screen devices Uses Intent.FLAG_ACTIVITY_NEW_TASK to start the Activity Test: manual Bug: 197701944 Change-Id: I6d52bae5ceb399c0869ef0c76d89f16867a83065 --- res/xml/wifi_configure_settings.xml | 10 +------ .../settings/wifi/ConfigureWifiSettings.java | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/res/xml/wifi_configure_settings.xml b/res/xml/wifi_configure_settings.xml index 623f3266453..2ab7b6a28fe 100644 --- a/res/xml/wifi_configure_settings.xml +++ b/res/xml/wifi_configure_settings.xml @@ -42,15 +42,7 @@ - - - - - + android:title="@string/wifi_install_credentials"/> { + Intent intent = new Intent(ACTION_INSTALL_CERTS); + intent.setFlags( + Intent.FLAG_ACTIVITY_NEW_TASK); + intent.setComponent( + new ComponentName(PACKAGE_INSTALL_CERTS, CLASS_INSTALL_CERTS)); + intent.putExtra(KEY_INSTALL_CERTIFICATE, INSTALL_CERTIFICATE_VALUE); + getContext().startActivity(intent); + return true; + }); + } else { + Log.d(TAG, "Can not find the preference."); + } } @Override