Loading api/system-current.txt +5 −0 Original line number Diff line number Diff line Loading @@ -5765,6 +5765,11 @@ package android.provider { field public static final String PROPERTY_PERMISSIONS_HUB_ENABLED = "permissions_hub_enabled"; } public static interface DeviceConfig.Runtime { field public static final String NAMESPACE = "runtime"; field public static final String USE_PRECOMPILED_LAYOUT = "view.precompiled_layout_enabled"; } public static interface DeviceConfig.RuntimeNative { field public static final String NAMESPACE = "runtime_native"; } Loading core/java/android/provider/DeviceConfig.java +15 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,21 @@ public final class DeviceConfig { String GENERATE_ACTIONS = "generate_actions"; } /** * Namespace for all runtime related features. * * @hide */ @SystemApi public interface Runtime { String NAMESPACE = "runtime"; /** * Whether or not we use the precompiled layout. */ String USE_PRECOMPILED_LAYOUT = "view.precompiled_layout_enabled"; } /** * Namespace for all runtime native related features. * Loading core/java/android/view/LayoutInflater.java +18 −6 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ import android.os.Handler; import android.os.Message; import android.os.SystemProperties; import android.os.Trace; import android.provider.DeviceConfig; import android.text.TextUtils; import android.util.AttributeSet; import android.util.Log; import android.util.TypedValue; Loading @@ -42,13 +44,14 @@ import android.widget.FrameLayout; import com.android.internal.R; import dalvik.system.PathClassLoader; import java.io.File; import java.lang.reflect.Method; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import java.io.File; import java.io.IOException; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.util.HashMap; /** Loading Loading @@ -78,8 +81,6 @@ public abstract class LayoutInflater { private static final String TAG = LayoutInflater.class.getSimpleName(); private static final boolean DEBUG = false; private static final String USE_PRECOMPILED_LAYOUT_SYSTEM_PROPERTY = "view.precompiled_layout_enabled"; private static final String COMPILED_VIEW_DEX_FILE_NAME = "/compiled_view.dex"; /** Empty stack trace used to avoid log spam in re-throw exceptions. */ Loading Loading @@ -400,8 +401,19 @@ public abstract class LayoutInflater { } private void initPrecompiledViews() { initPrecompiledViews( SystemProperties.getBoolean(USE_PRECOMPILED_LAYOUT_SYSTEM_PROPERTY, false)); // Use the device config if enabled, otherwise default to the system property. String usePrecompiledLayout = DeviceConfig.getProperty( DeviceConfig.Runtime.NAMESPACE, DeviceConfig.Runtime.USE_PRECOMPILED_LAYOUT); boolean enabled = false; if (TextUtils.isEmpty(usePrecompiledLayout)) { enabled = SystemProperties.getBoolean( DeviceConfig.Runtime.USE_PRECOMPILED_LAYOUT, false); } else { enabled = Boolean.parseBoolean(usePrecompiledLayout); } initPrecompiledViews(enabled); } private void initPrecompiledViews(boolean enablePrecompiledViews) { Loading Loading
api/system-current.txt +5 −0 Original line number Diff line number Diff line Loading @@ -5765,6 +5765,11 @@ package android.provider { field public static final String PROPERTY_PERMISSIONS_HUB_ENABLED = "permissions_hub_enabled"; } public static interface DeviceConfig.Runtime { field public static final String NAMESPACE = "runtime"; field public static final String USE_PRECOMPILED_LAYOUT = "view.precompiled_layout_enabled"; } public static interface DeviceConfig.RuntimeNative { field public static final String NAMESPACE = "runtime_native"; } Loading
core/java/android/provider/DeviceConfig.java +15 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,21 @@ public final class DeviceConfig { String GENERATE_ACTIONS = "generate_actions"; } /** * Namespace for all runtime related features. * * @hide */ @SystemApi public interface Runtime { String NAMESPACE = "runtime"; /** * Whether or not we use the precompiled layout. */ String USE_PRECOMPILED_LAYOUT = "view.precompiled_layout_enabled"; } /** * Namespace for all runtime native related features. * Loading
core/java/android/view/LayoutInflater.java +18 −6 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ import android.os.Handler; import android.os.Message; import android.os.SystemProperties; import android.os.Trace; import android.provider.DeviceConfig; import android.text.TextUtils; import android.util.AttributeSet; import android.util.Log; import android.util.TypedValue; Loading @@ -42,13 +44,14 @@ import android.widget.FrameLayout; import com.android.internal.R; import dalvik.system.PathClassLoader; import java.io.File; import java.lang.reflect.Method; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import java.io.File; import java.io.IOException; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.util.HashMap; /** Loading Loading @@ -78,8 +81,6 @@ public abstract class LayoutInflater { private static final String TAG = LayoutInflater.class.getSimpleName(); private static final boolean DEBUG = false; private static final String USE_PRECOMPILED_LAYOUT_SYSTEM_PROPERTY = "view.precompiled_layout_enabled"; private static final String COMPILED_VIEW_DEX_FILE_NAME = "/compiled_view.dex"; /** Empty stack trace used to avoid log spam in re-throw exceptions. */ Loading Loading @@ -400,8 +401,19 @@ public abstract class LayoutInflater { } private void initPrecompiledViews() { initPrecompiledViews( SystemProperties.getBoolean(USE_PRECOMPILED_LAYOUT_SYSTEM_PROPERTY, false)); // Use the device config if enabled, otherwise default to the system property. String usePrecompiledLayout = DeviceConfig.getProperty( DeviceConfig.Runtime.NAMESPACE, DeviceConfig.Runtime.USE_PRECOMPILED_LAYOUT); boolean enabled = false; if (TextUtils.isEmpty(usePrecompiledLayout)) { enabled = SystemProperties.getBoolean( DeviceConfig.Runtime.USE_PRECOMPILED_LAYOUT, false); } else { enabled = Boolean.parseBoolean(usePrecompiledLayout); } initPrecompiledViews(enabled); } private void initPrecompiledViews(boolean enablePrecompiledViews) { Loading