OSDN Git Service

Don't require apps to call showLights to use default lights.
authorJulia Reynolds <juliacr@google.com>
Tue, 2 Feb 2016 20:11:59 +0000 (15:11 -0500)
committerJulia Reynolds <juliacr@google.com>
Tue, 2 Feb 2016 20:11:59 +0000 (15:11 -0500)
Bug: 26810573
Change-Id: I431a1a18e32c616238e763b401b5f6b14131fd89

core/java/android/app/Notification.java

index 7f037f2..34c90c1 100644 (file)
@@ -2623,9 +2623,6 @@ public class Notification implements Parcelable
             if (onMs != 0 || offMs != 0) {
                 mN.flags |= FLAG_SHOW_LIGHTS;
             }
-            if ((mN.defaults & DEFAULT_LIGHTS) != 0) {
-                mN.flags |= FLAG_SHOW_LIGHTS;
-            }
             return this;
         }
 
@@ -3603,6 +3600,10 @@ public class Notification implements Parcelable
                 mStyle.buildStyled(mN);
             }
 
+            if ((mN.defaults & DEFAULT_LIGHTS) != 0) {
+                mN.flags |= FLAG_SHOW_LIGHTS;
+            }
+
             return mN;
         }