diff options
author | Nate Jiang <qiangjiang@google.com> | 2019-08-23 04:22:26 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-08-23 04:22:26 +0000 |
commit | 07ba9343d2142ee08bffa4febb1e7813d10d7774 (patch) | |
tree | 3515d17575fff3b844716fcb875d8372767b3f80 | |
parent | 3e744d5fa142d8e868aa16bc9d01a5813a7e694c (diff) | |
parent | 12c4b964dfe9412ef62f20afa6b295968d2e5f06 (diff) |
Merge "[NetworkSuggestion] change notification content" into qt-qpr1-dev
-rw-r--r-- | service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java | 3 | ||||
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java index e1d2a02e4..972d1c93f 100644 --- a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java +++ b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java @@ -793,7 +793,8 @@ public class WifiNetworkSuggestionsManager { .setSmallIcon(R.drawable.stat_notify_wifi_in_range) .setTicker(mResources.getString(R.string.wifi_suggestion_title)) .setContentTitle(mResources.getString(R.string.wifi_suggestion_title)) - .setContentText(mResources.getString(R.string.wifi_suggestion_content, appName)) + .setStyle(new Notification.BigTextStyle() + .bigText(mResources.getString(R.string.wifi_suggestion_content, appName))) .setDeleteIntent(getPrivateBroadcast(NOTIFICATION_USER_DISMISSED_INTENT_ACTION, packageName, uid)) .setShowWhen(false) diff --git a/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java index 9b462681a..ae4da66d6 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java @@ -20,7 +20,7 @@ import static android.app.AppOpsManager.MODE_ALLOWED; import static android.app.AppOpsManager.MODE_IGNORED; import static android.app.AppOpsManager.OPSTR_CHANGE_WIFI_STATE; import static android.app.AppOpsManager.OP_CHANGE_WIFI_STATE; -import static android.app.Notification.EXTRA_TEXT; +import static android.app.Notification.EXTRA_BIG_TEXT; import static com.android.server.wifi.WifiNetworkSuggestionsManager.NOTIFICATION_USER_ALLOWED_APP_INTENT_ACTION; import static com.android.server.wifi.WifiNetworkSuggestionsManager.NOTIFICATION_USER_DISALLOWED_APP_INTENT_ACTION; @@ -2196,7 +2196,7 @@ public class WifiNetworkSuggestionsManagerTest { private boolean checkUserApprovalNotificationParams( Notification notification, String expectedAppName) { - if (!notification.extras.getString(EXTRA_TEXT).contains(expectedAppName)) return false; + if (!notification.extras.getString(EXTRA_BIG_TEXT).contains(expectedAppName)) return false; return true; } |