OSDN Git Service

Fix swapped toast timeouts.
authorRobert Carr <racarr@google.com>
Fri, 22 Jul 2016 01:16:00 +0000 (18:16 -0700)
committerRobert Carr <racarr@google.com>
Fri, 22 Jul 2016 01:16:00 +0000 (18:16 -0700)
LONG and SHORT were swapped. Also they weren't related to the
actual timeout values in NotificationManagerService. Set the timeout
to twice the duration. Just proposing to master since all the
toast timeout does in N is strip the FLAG_KEEP_SCREEN_ON_FLAG.

Change-Id: I5533e03b45d8f9518919b19ec53fc839443f8886

core/java/android/widget/Toast.java

index 7762675..e147ed6 100644 (file)
@@ -357,8 +357,8 @@ public class Toast {
 
         WindowManager mWM;
 
-        static final long SHORT_DURATION_TIMEOUT = 5000;
-        static final long LONG_DURATION_TIMEOUT = 1000;
+        static final long SHORT_DURATION_TIMEOUT = 4000;
+        static final long LONG_DURATION_TIMEOUT = 7000;
 
         TN() {
             // XXX This should be changed to use a Dialog, with a Theme.Toast