Don't buzz when automatically connecting to captive portals

Play a sound and vibrate (by setting DEFAULT_ALL) only if the
user manually selected the network. This applies to both captive
portals and networks with no Internet access.

Bug: 24126143
Change-Id: Idf075d5c85f9f4b07a3431a25d1a3f7089cf1ee2
This commit is contained in:
Lorenzo Colitti
2015-10-21 09:15:41 +09:00
parent f90627d40b
commit c22996447c

View File

@@ -3363,7 +3363,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
.setPriority(highPriority ?
Notification.PRIORITY_HIGH :
Notification.PRIORITY_DEFAULT)
.setDefaults(Notification.DEFAULT_ALL)
.setDefaults(highPriority ? Notification.DEFAULT_ALL : 0)
.setOnlyAlertOnce(true)
.build();