Commit 7a52fca8 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Android: Better -keep rules for BackgroundTasks

As suggested by r8 team.

Bug: 985372
Change-Id: I2ca93568d06800a7bf82476ef0ca106492084fb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1711251Reviewed-by: default avatarTommy Nyquist <nyquist@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#679977}
parent 2a8e5f6c
......@@ -358,18 +358,9 @@
# found in the LICENSE file.
# Classes are created via reflection and persisted across app updates, so their
# class names must not be obfuscated.
-keepnames class ** implements org.chromium.components.background_task_scheduler.BackgroundTask {}
# Also need to keep their default constructors.
-keepclassmembers class ** implements org.chromium.components.background_task_scheduler.BackgroundTask {
public <init>();
}
# TODO(agrieve): Delete this rule once r8 is fixed to not discard
# GCMBackgroundTask.<init>() with only the above rules.
# https://issuetracker.google.com/issues/137890409
-keep class ** implements org.chromium.components.background_task_scheduler.BackgroundTask {
# class names must not be obfuscated, and constructors kept.
-if class ** implements org.chromium.components.background_task_scheduler.BackgroundTask
-keep class <1> {
public <init>();
}
......
......@@ -3,17 +3,8 @@
# found in the LICENSE file.
# Classes are created via reflection and persisted across app updates, so their
# class names must not be obfuscated.
-keepnames class ** implements org.chromium.components.background_task_scheduler.BackgroundTask {}
# Also need to keep their default constructors.
-keepclassmembers class ** implements org.chromium.components.background_task_scheduler.BackgroundTask {
public <init>();
}
# TODO(agrieve): Delete this rule once r8 is fixed to not discard
# GCMBackgroundTask.<init>() with only the above rules.
# https://issuetracker.google.com/issues/137890409
-keep class ** implements org.chromium.components.background_task_scheduler.BackgroundTask {
# class names must not be obfuscated, and constructors kept.
-if class ** implements org.chromium.components.background_task_scheduler.BackgroundTask
-keep class <1> {
public <init>();
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment