Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5eb3ffc2 authored by Adam Powell's avatar Adam Powell
Browse files

Remove View methods that can't be used safely from the SDK

View methods that previously accepted a TypedArray to initialize
parameters parsed from xml cannot be used correctly by apps. The
TypedArray passed must always be obtained from a context using the
filter array com.android.internal.R.styleable.View, which is not
visible to the SDK.

A previous change already made this safe for existing apps already
using it so that they don't crash, this change removes these methods
from the SDK entirely.

Change-Id: I62099087ad6fd5bf8363e863b04fd0434b8cdfca
parent f35423bb
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -33833,8 +33833,6 @@ package android.view {
    method public boolean hasTransientState();
    method public boolean hasWindowFocus();
    method public static android.view.View inflate(android.content.Context, int, android.view.ViewGroup);
    method protected void initializeFadingEdge(android.content.res.TypedArray);
    method protected void initializeScrollbars(android.content.res.TypedArray);
    method public void invalidate(android.graphics.Rect);
    method public void invalidate(int, int, int, int);
    method public void invalidate();
+5 −0
Original line number Diff line number Diff line
@@ -24,6 +24,11 @@ package android.os {

package android.view {

  public class View implements android.view.accessibility.AccessibilityEventSource android.graphics.drawable.Drawable.Callback android.view.KeyEvent.Callback {
    method protected void initializeFadingEdge(android.content.res.TypedArray);
    method protected void initializeScrollbars(android.content.res.TypedArray);
  }

  public static class WindowManager.LayoutParams extends android.view.ViewGroup.LayoutParams implements android.os.Parcelable {
    field public static final int TYPE_KEYGUARD = 2004; // 0x7d4
  }
+4 −0
Original line number Diff line number Diff line
@@ -4299,6 +4299,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * </p>
     *
     * @param a the styled attributes set to initialize the fading edges from
     *
     * @removed
     */
    protected void initializeFadingEdge(TypedArray a) {
        // This method probably shouldn't have been included in the SDK to begin with.
@@ -4439,6 +4441,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * </p>
     *
     * @param a the styled attributes set to initialize the scrollbars from
     *
     * @removed
     */
    protected void initializeScrollbars(TypedArray a) {
        // It's not safe to use this method from apps. The parameter 'a' must have been obtained