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

Issue 707804 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocked on:
issue 735481



Sign in to add a comment

Stop using reflection to access channels APIs once compileSdkVersion is bumped to O

Project Member Reported by awdf@chromium.org, Apr 3 2017

Issue description

Right now we use reflection to set notification channels on android O because the compileSdkVersion in master is bumped to the O sdk version (presumably 26). Once this is bumped we can remove the reflection and just access the methods directly (within version code checks).

(Once the support lib is updated we can even remove the version checks and our custom notification builder and just use NotificationCompat / NotificationManagerCompat methods - there's a separate bug for this at  https://crbug.com/704152  )
 

Comment 1 by awdf@chromium.org, Apr 3 2017

Description: Show this description

Comment 2 by awdf@chromium.org, Apr 3 2017

Blockedon: 685808

Comment 3 by awdf@chromium.org, Apr 3 2017

Summary: Stop using reflection to set channels once compileSdkVersion is bumped to O (was: Stop using reflection to set channels once compileSdkVersion is bumped to 26)

Comment 4 by awdf@chromium.org, Apr 20 2017

Summary: Stop using reflection to access channels APIs once compileSdkVersion is bumped to O (was: Stop using reflection to set channels once compileSdkVersion is bumped to O)

Comment 5 by awdf@chromium.org, Jun 28 2017

Blockedon: -685808 735481
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5fcd45dd3c18065269793d130ca804093872b246

commit 5fcd45dd3c18065269793d130ca804093872b246
Author: Anita Woodruff <awdf@chromium.org>
Date: Thu Aug 17 14:30:06 2017

[Android Notification Channels] Removing reflection

- Now we compile against O by default, the reflection to access O APIs
that set and get notification channels can be removed.

- No longer require the 'Channel' translation class either, now we can
refer to the android.app.NotificationChannel type directly.

Bug:  707804 
Change-Id: Ia4dda0eba81a0036b6761cdfffbdb1882d2ef91e
Reviewed-on: https://chromium-review.googlesource.com/568026
Commit-Queue: Anita Woodruff <awdf@chromium.org>
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495167}
[modify] https://crrev.com/5fcd45dd3c18065269793d130ca804093872b246/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderForO.java
[modify] https://crrev.com/5fcd45dd3c18065269793d130ca804093872b246/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationManagerProxy.java
[modify] https://crrev.com/5fcd45dd3c18065269793d130ca804093872b246/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationManagerProxyImpl.java
[modify] https://crrev.com/5fcd45dd3c18065269793d130ca804093872b246/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java
[modify] https://crrev.com/5fcd45dd3c18065269793d130ca804093872b246/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationSettingsBridge.java
[modify] https://crrev.com/5fcd45dd3c18065269793d130ca804093872b246/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUmaTracker.java
[delete] https://crrev.com/0591e310e4e4a8d876f215894e60fae68ca2597b/chrome/android/java/src/org/chromium/chrome/browser/notifications/channels/Channel.java
[modify] https://crrev.com/5fcd45dd3c18065269793d130ca804093872b246/chrome/android/java/src/org/chromium/chrome/browser/notifications/channels/ChannelDefinitions.java
[modify] https://crrev.com/5fcd45dd3c18065269793d130ca804093872b246/chrome/android/java/src/org/chromium/chrome/browser/notifications/channels/ChannelsInitializer.java
[modify] https://crrev.com/5fcd45dd3c18065269793d130ca804093872b246/chrome/android/java/src/org/chromium/chrome/browser/notifications/channels/SiteChannelsManager.java
[modify] https://crrev.com/5fcd45dd3c18065269793d130ca804093872b246/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java
[modify] https://crrev.com/5fcd45dd3c18065269793d130ca804093872b246/chrome/android/java_sources.gni
[modify] https://crrev.com/5fcd45dd3c18065269793d130ca804093872b246/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/channels/ChannelsInitializerTest.java
[add] https://crrev.com/5fcd45dd3c18065269793d130ca804093872b246/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/channels/ChannelsUpdaterTest.java
[modify] https://crrev.com/5fcd45dd3c18065269793d130ca804093872b246/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/channels/SiteChannelsManagerTest.java
[delete] https://crrev.com/0591e310e4e4a8d876f215894e60fae68ca2597b/chrome/android/junit/src/org/chromium/chrome/browser/notifications/channels/ChannelsUpdaterTest.java
[modify] https://crrev.com/5fcd45dd3c18065269793d130ca804093872b246/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/notifications/MockNotificationManagerProxy.java

Comment 7 by awdf@chromium.org, Dec 20 2017

Status: Fixed (was: ExternalDependency)

Comment 8 Deleted

Sign in to add a comment