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

Commit 0c0e82a8 authored by Cătălin Tudor's avatar Cătălin Tudor
Browse files

Moved LayoutInflater#mContext to dark grey list

In LayoutInflater, moved the member mContext to dark grey list of APIs,
disabling access for apps targeting Q. Developers should use the provided
getter getContext to retrieve the context or the method cloneInContext to
create a LayoutInflater copy with a different context. Both methods are
available since API 1.

Bug: 117519957
Test: android.view.cts.LayoutInflaterTest
Change-Id: Id86969dddb14fafd76fda1b0a97c7f8fc09aca3e
parent a68e3ccd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.content.res.Resources;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.graphics.Canvas;
import android.os.Build;
import android.os.Handler;
import android.os.Message;
import android.os.Trace;
@@ -78,7 +79,7 @@ public abstract class LayoutInflater {
     * This field should be made private, so it is hidden from the SDK.
     * {@hide}
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
    protected final Context mContext;

    // these are optional, set by the caller