Streamline SystemUI proguard flags

Remove several unnecessary top-level class keep rules, and inline
@Keep annotations for animatable property accessors.

Bug: 196084106
Test: m SystemUI (yields identical binary)
Change-Id: I3b820a59214d2fdc8e94c38c4317a4e5f44a397f
This commit is contained in:
Jared Duke
2021-10-15 11:05:30 -07:00
parent bbd05d765e
commit 3d9c5d3ee1
3 changed files with 13 additions and 17 deletions

View File

@@ -1,20 +1,3 @@
-keep class com.android.systemui.navigationbar.buttons.KeyButtonView {
public float getDrawingAlpha();
public void setDrawingAlpha(float);
}
-keep class com.android.systemui.navigationbar.buttons.KeyButtonRipple {
public float getGlowAlpha();
public float getGlowScale();
public void setGlowAlpha(float);
public void setGlowScale(float);
}
-keep class com.android.systemui.settings.brightness.BrightnessSliderView {
public float getSliderScaleY();
public void setSliderScaleY(float);
}
-keep class com.android.systemui.recents.OverviewProxyRecentsImpl
-keep class com.android.systemui.statusbar.car.CarStatusBar
-keep class com.android.systemui.statusbar.phone.StatusBar

View File

@@ -34,6 +34,8 @@ import android.view.View;
import android.view.ViewConfiguration;
import android.view.animation.Interpolator;
import androidx.annotation.Keep;
import com.android.systemui.R;
import com.android.systemui.animation.Interpolators;
@@ -184,19 +186,27 @@ public class KeyButtonRipple extends Drawable {
}
}
/** Gets the glow alpha, used by {@link android.animation.ObjectAnimator} via reflection. */
@Keep
public float getGlowAlpha() {
return mGlowAlpha;
}
/** Sets the glow alpha, used by {@link android.animation.ObjectAnimator} via reflection. */
@Keep
public void setGlowAlpha(float x) {
mGlowAlpha = x;
invalidateSelf();
}
/** Gets the glow scale, used by {@link android.animation.ObjectAnimator} via reflection. */
@Keep
public float getGlowScale() {
return mGlowScale;
}
/** Sets the glow scale, used by {@link android.animation.ObjectAnimator} via reflection. */
@Keep
public void setGlowScale(float x) {
mGlowScale = x;
invalidateSelf();

View File

@@ -27,6 +27,7 @@ import android.view.View;
import android.widget.FrameLayout;
import android.widget.SeekBar.OnSeekBarChangeListener;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -183,6 +184,7 @@ public class BrightnessSliderView extends FrameLayout {
*
* Used in {@link com.android.systemui.qs.QSAnimator}.
*/
@Keep
public void setSliderScaleY(float scale) {
if (scale != mScale) {
mScale = scale;
@@ -199,6 +201,7 @@ public class BrightnessSliderView extends FrameLayout {
}
}
@Keep
public float getSliderScaleY() {
return mScale;
}