New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 773661 link

Starred by 0 users

Issue metadata

Status: Closed
Owner:
Last visit > 30 days ago
Closed: Aug 2
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Task



Sign in to add a comment

Fix up Android lint deprecation warnings in Notifications java code

Project Member Reported by awdf@chromium.org, Oct 11 2017

Issue description

Chrome Version: 63
OS: Android

What steps will reproduce the problem?
(1) Make changes to NotificationPlatformBridgeTest.java
(2) Recompile with:
        ninja -C out/AndroidDebug -j2000 -l20 chrome_public_test_apk_incremental

What is the expected result?

No deprecation warnings in output

What happens instead?

Lots of deprecation warnings:

NotificationPlatformBridgeTest.java:297: warning: [deprecation] defaults in Notification has been deprecated
        Assert.assertEquals(Notification.DEFAULT_ALL, notification.defaults);
                                                                  ^
NotificationPlatformBridgeTest.java:298: warning: [deprecation] PRIORITY_DEFAULT in Notification has been deprecated
        Assert.assertEquals(Notification.PRIORITY_DEFAULT, notification.priority);
                                        ^
NotificationPlatformBridgeTest.java:298: warning: [deprecation] priority in Notification has been deprecated
        Assert.assertEquals(Notification.PRIORITY_DEFAULT, notification.priority);
                                                                       ^
NotificationPlatformBridgeTest.java:486: warning: [deprecation] defaults in Notification has been deprecated
        Assert.assertEquals(0, notification.defaults);
                                           ^
NotificationPlatformBridgeTest.java:506: warning: [deprecation] defaults in Notification has been deprecated
                Notification.DEFAULT_ALL & ~Notification.DEFAULT_VIBRATE, notification.defaults);
                                                                                      ^
NotificationPlatformBridgeTest.java:509: warning: [deprecation] vibrate in Notification has been deprecated
        Assert.assertEquals(1, notification.vibrate.length);
                                           ^
NotificationPlatformBridgeTest.java:510: warning: [deprecation] vibrate in Notification has been deprecated
        Assert.assertEquals(0L, notification.vibrate[0]);
                                            ^
NotificationPlatformBridgeTest.java:560: warning: [deprecation] defaults in Notification has been deprecated
                Notification.DEFAULT_ALL & ~Notification.DEFAULT_VIBRATE, notification.defaults);

NotificationPlatformBridgeTest.java:563: warning: [deprecation] vibrate in Notification has been deprecated
        Assert.assertEquals(2, notification.vibrate.length);
                                           ^
NotificationPlatformBridgeTest.java:564: warning: [deprecation] vibrate in Notification has been deprecated
        Assert.assertEquals(0L, notification.vibrate[0]);
                                            ^
NotificationPlatformBridgeTest.java:565: warning: [deprecation] vibrate in Notification has been deprecated
        Assert.assertEquals(42L, notification.vibrate[1]);


 

Comment 1 by awdf@chromium.org, Oct 13 2017

Summary: Fix up Android lint deprecation warnings in Notifications java code (was: Fix up Android lint deprecation warnings in NotificationPlatformBridgeTest)
There's also warnings from chrome/browser/notifications/NotificationBuilder.java :

src/out/AndroidDebug/../../chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilder.java:27: warning: [deprecation] Builder(Context) in Builder has been deprecated
        mBuilder = new Notification.Builder(mContext);
                   ^
src/out/AndroidDebug/../../chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilder.java:158: warning: [deprecation] setPriority(int) in Builder has been deprecated
        mBuilder.setPriority(pri);
                ^
src/out/AndroidDebug/../../chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilder.java:199: warning: [deprecation] setVibrate(long[]) in Builder has been deprecated
        mBuilder.setVibrate(vibratePattern);
                ^
src/out/AndroidDebug/../../chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilder.java:205: warning: [deprecation] setDefaults(int) in Builder has been deprecated
        mBuilder.setDefaults(defaults);

Status: Assigned (was: Available)
Status: Closed (was: Assigned)
No longer an issue (either got fixed or deprecation warnings got turned off - I suspect the latter).

Sign in to add a comment