From f3effc2ee0df1465647c00277c81ddd3b9e6ad02 Mon Sep 17 00:00:00 2001 From: Quang Anh Luong Date: Thu, 24 Oct 2024 15:03:50 +0900 Subject: Update P2P dialog Update P2P dialog strings to be more user friendly and show the peer device name in the dialog message instead of a separate line. Flag: com.android.wifi.flags.p2p_dialog2 Bug: 349253691 Test: Manual verification via shell cmd that P2P dialog styles are correct Change-Id: Iaa719420deed4472be4b4b8060ec987a9cd9092f --- .../res/layout/wifi_p2p_dialog2_display_pin.xml | 25 +++++++++++++ .../res/layout/wifi_p2p_dialog2_enter_pin.xml | 25 +++++++++++++ .../res/values-night/styles.xml | 14 ++++++++ .../res/values/overlayable.xml | 31 ++++++++++++---- .../ServiceWifiResources/res/values/strings.xml | 42 ++++++++++++++++++++++ service/ServiceWifiResources/res/values/styles.xml | 34 ++++++++++++++++++ 6 files changed, 164 insertions(+), 7 deletions(-) create mode 100644 service/ServiceWifiResources/res/layout/wifi_p2p_dialog2_display_pin.xml create mode 100644 service/ServiceWifiResources/res/layout/wifi_p2p_dialog2_enter_pin.xml (limited to 'service/ServiceWifiResources') diff --git a/service/ServiceWifiResources/res/layout/wifi_p2p_dialog2_display_pin.xml b/service/ServiceWifiResources/res/layout/wifi_p2p_dialog2_display_pin.xml new file mode 100644 index 0000000000..020f987d8d --- /dev/null +++ b/service/ServiceWifiResources/res/layout/wifi_p2p_dialog2_display_pin.xml @@ -0,0 +1,25 @@ + + + + + + + + diff --git a/service/ServiceWifiResources/res/layout/wifi_p2p_dialog2_enter_pin.xml b/service/ServiceWifiResources/res/layout/wifi_p2p_dialog2_enter_pin.xml new file mode 100644 index 0000000000..32da7b78a1 --- /dev/null +++ b/service/ServiceWifiResources/res/layout/wifi_p2p_dialog2_enter_pin.xml @@ -0,0 +1,25 @@ + + + + + + + + diff --git a/service/ServiceWifiResources/res/values-night/styles.xml b/service/ServiceWifiResources/res/values-night/styles.xml index 9279ee3780..a97049517e 100644 --- a/service/ServiceWifiResources/res/values-night/styles.xml +++ b/service/ServiceWifiResources/res/values-night/styles.xml @@ -23,4 +23,18 @@ number @android:color/primary_text_dark + + + diff --git a/service/ServiceWifiResources/res/values/overlayable.xml b/service/ServiceWifiResources/res/values/overlayable.xml index 7409ad1414..a64f330b05 100644 --- a/service/ServiceWifiResources/res/values/overlayable.xml +++ b/service/ServiceWifiResources/res/values/overlayable.xml @@ -390,13 +390,19 @@ - - - - - - - + + + + + + + + + + + + + @@ -505,6 +511,17 @@ + + + + + + + + + + + diff --git a/service/ServiceWifiResources/res/values/strings.xml b/service/ServiceWifiResources/res/values/strings.xml index 26624b023e..3660d752b8 100644 --- a/service/ServiceWifiResources/res/values/strings.xml +++ b/service/ServiceWifiResources/res/values/strings.xml @@ -100,6 +100,7 @@ Invitation sent Invitation to connect + {0, plural, @@ -111,6 +112,47 @@ To: Type the required PIN: PIN: + + + + Device connection + Device connection + Invitation sent to %1$s. + Enter this PIN on %1$s to connect. + OK + + Device connection + Device connection + Device connection + %1$s wants to connect to your device. + Enter the PIN shown on %1$s to connect. + %1$s wants to connect to your device with the following PIN. + + + {countdown, plural, + =1 {{device} wants to connect to your device. Accept in {countdown} second.} + other {{device} wants to connect to your device. Accept in {countdown} seconds.} + } + + + {countdown, plural, + =1 {Enter the PIN shown on {device} within {countdown} second to connect.} + other {Enter the PIN shown on {device} within {countdown} seconds to connect.} + } + + + {countdown, plural, + =1 {{device} wants to connect to your device with the following PIN. Accept in {countdown} second.} + other {{device} wants to connect to your device with the following PIN. Accept in {countdown} seconds.} + } + + + Connect + Cancel + + PIN + PIN + Your device will temporarily disconnect from Wi-Fi while it\'s connected to %1$s diff --git a/service/ServiceWifiResources/res/values/styles.xml b/service/ServiceWifiResources/res/values/styles.xml index 714d10fe0f..e86aee8417 100644 --- a/service/ServiceWifiResources/res/values/styles.xml +++ b/service/ServiceWifiResources/res/values/styles.xml @@ -63,4 +63,38 @@ number @android:color/primary_text_light + + + + + + + +