diff options
author | 2024-10-19 14:49:17 +0900 | |
---|---|---|
committer | 2024-10-25 16:51:01 +0900 | |
commit | d3a4cd09e280cf9e2c86adccc87313fcbffe6f54 (patch) | |
tree | 6a43b7c70559c646cd1d8f824552969ec41ab3e0 | |
parent | 17b480b50f4d57a6f358bc57cd15cca15ec8072e (diff) |
Add overlay to control showing P2P invitation timeout
Updated-Overlayable: TRUE
Flag: EXEMPT gated by overlay
Bug: 349253691
Test: manually verify dialog doesn't show timeout when overlay value is
false
Change-Id: I94a88ccd43c808da0a9cb020b25f03d13ac81d04
3 files changed, 6 insertions, 0 deletions
diff --git a/WifiDialog/src/com/android/wifi/dialog/WifiDialogActivity.java b/WifiDialog/src/com/android/wifi/dialog/WifiDialogActivity.java index 8069993b02..043e430d71 100644 --- a/WifiDialog/src/com/android/wifi/dialog/WifiDialogActivity.java +++ b/WifiDialog/src/com/android/wifi/dialog/WifiDialogActivity.java @@ -667,6 +667,9 @@ public class WifiDialogActivity extends Activity { (int) millisUntilFinished); } + if (!getWifiBoolean("config_p2pInvitationReceivedDialogShowRemainingTime")) { + return; + } int secondsRemaining = (int) millisUntilFinished / 1000; if (millisUntilFinished % 1000 != 0) { // Round up to the nearest whole second. diff --git a/service/ServiceWifiResources/res/values/config.xml b/service/ServiceWifiResources/res/values/config.xml index aaaa4ab5d6..38d1a41516 100644 --- a/service/ServiceWifiResources/res/values/config.xml +++ b/service/ServiceWifiResources/res/values/config.xml @@ -1060,6 +1060,8 @@ <!-- Indicate the time in milliseconds to wait before auto-cancelling a P2P invitation received dialog that the user has not responded to. A value of 0 indicates no timeout. --> <integer translatable="false" name="config_p2pInvitationReceivedDialogTimeoutMs">0</integer> + <!-- Whether to show the timeout in the P2P invitation received dialog --> + <bool translatable="false" name="config_p2pInvitationReceivedDialogShowRemainingTime">true</bool> <!-- Indicates whether or not to play a notification sound upon displaying a P2P invitation received dialog that the user has not responded to. If the device is in vibrate mode, then the device will vibrate instead of playing a sound. --> diff --git a/service/ServiceWifiResources/res/values/overlayable.xml b/service/ServiceWifiResources/res/values/overlayable.xml index d499e366a2..46a4e479a8 100644 --- a/service/ServiceWifiResources/res/values/overlayable.xml +++ b/service/ServiceWifiResources/res/values/overlayable.xml @@ -297,6 +297,7 @@ <item type="bool" name="config_wifiDialogCanceledOnTouchOutside" /> <item type="bool" name="config_showConfirmationDialogForThirdPartyAppsEnablingWifi" /> <item type="integer" name="config_p2pInvitationReceivedDialogTimeoutMs"/> + <item type="bool" name="config_p2pInvitationReceivedDialogShowRemainingTime" /> <item type="bool" name="config_p2pInvitationReceivedDialogNotificationSound"/> <item type="integer" name="config_wifiP2pJoinRequestAuthorizingTimeoutMs" /> <item type="bool" name="config_wifiForcedSoftApRestartWhenCountryCodeChanged" /> |