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

Commit 64e8dd21 authored by Matt Pape's avatar Matt Pape Committed by Android (Google) Code Review
Browse files

Merge "Remove interfaces for runtime and runtime_native namespaces."

parents d8658f3d e9b680a3
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -5867,6 +5867,8 @@ package android.provider {
    field public static final String NAMESPACE_INTELLIGENCE_ATTENTION = "intelligence_attention";
    field public static final String NAMESPACE_MEDIA_NATIVE = "media_native";
    field public static final String NAMESPACE_NETD_NATIVE = "netd_native";
    field public static final String NAMESPACE_RUNTIME = "runtime";
    field public static final String NAMESPACE_RUNTIME_NATIVE = "runtime_native";
    field public static final String NAMESPACE_RUNTIME_NATIVE_BOOT = "runtime_native_boot";
    field public static final String NAMESPACE_SYSTEMUI = "systemui";
    field public static final String NAMESPACE_TEXTCLASSIFIER = "textclassifier";
@@ -5909,15 +5911,6 @@ package android.provider {
    field public static final String ROLLBACK_LIFETIME_IN_MILLIS = "rollback_lifetime_in_millis";
  }
  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";
  }
  public static interface DeviceConfig.Scheduler {
    field public static final String ENABLE_FAST_METRICS_COLLECTION = "enable_fast_metrics_collection";
    field public static final String NAMESPACE = "scheduler";
+6 −9
Original line number Diff line number Diff line
@@ -21,12 +21,12 @@ import android.annotation.Nullable;
import android.content.pm.ApplicationInfo;
import android.net.LocalSocket;
import android.net.LocalSocketAddress;
import android.provider.DeviceConfig;
import android.util.Log;
import android.util.Slog;

import com.android.internal.annotations.GuardedBy;
import com.android.internal.os.Zygote;
import com.android.internal.os.ZygoteConfig;

import java.io.BufferedWriter;
import java.io.DataInputStream;
@@ -659,15 +659,12 @@ public class ZygoteProcess {
    private boolean fetchUsapPoolEnabledProp() {
        boolean origVal = mUsapPoolEnabled;

        final String propertyString =
                Zygote.getConfigurationProperty(
                        DeviceConfig.RuntimeNative.USAP_POOL_ENABLED,
                        USAP_POOL_ENABLED_DEFAULT);
        final String propertyString = Zygote.getConfigurationProperty(
                ZygoteConfig.USAP_POOL_ENABLED, USAP_POOL_ENABLED_DEFAULT);

        if (!propertyString.isEmpty()) {
            mUsapPoolEnabled =
                    Zygote.getConfigurationPropertyBoolean(
                            DeviceConfig.RuntimeNative.USAP_POOL_ENABLED,
            mUsapPoolEnabled = Zygote.getConfigurationPropertyBoolean(
                    ZygoteConfig.USAP_POOL_ENABLED,
                    Boolean.parseBoolean(USAP_POOL_ENABLED_DEFAULT));
        }

+11 −52
Original line number Diff line number Diff line
@@ -155,86 +155,45 @@ public final class DeviceConfig {
    public static final String NAMESPACE_NETD_NATIVE = "netd_native";

    /**
     * Namespace for all runtime native boot related features. Boot in this case refers to the
     * fact that the properties only take affect after rebooting the device.
     * Namespace for all runtime related features.
     *
     * @hide
     */
    @SystemApi
    public static final String NAMESPACE_RUNTIME_NATIVE_BOOT = "runtime_native_boot";
    public static final String NAMESPACE_RUNTIME = "runtime";

    /**
     * Namespace for System UI related features.
     * Namespace for all runtime native related features.
     *
     * @hide
     */
    @SystemApi
    public static final String NAMESPACE_SYSTEMUI = "systemui";
    public static final String NAMESPACE_RUNTIME_NATIVE = "runtime_native";

    /**
     * Namespace for TextClassifier related features.
     * Namespace for all runtime native boot related features. Boot in this case refers to the
     * fact that the properties only take affect after rebooting the device.
     *
     * @hide
     */
    @SystemApi
    public static final String NAMESPACE_TEXTCLASSIFIER = "textclassifier";
    public static final String NAMESPACE_RUNTIME_NATIVE_BOOT = "runtime_native_boot";

    /**
     * Namespace for all runtime related features.
     * Namespace for System UI 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";
    }
    public static final String NAMESPACE_SYSTEMUI = "systemui";

    /**
     * Namespace for all runtime native related features.
     * Namespace for TextClassifier related features.
     *
     * @hide
     */
    @SystemApi
    public interface RuntimeNative {
        String NAMESPACE = "runtime_native";

        /**
         * Zygote flags. See {@link com.internal.os.Zygote}.
         */

        /**
         * If {@code true}, enables the unspecialized app process (USAP) pool feature.
         *
         * @hide for internal use only
         */
        String USAP_POOL_ENABLED = "usap_pool_enabled";

        /**
         * The maximum number of processes to keep in the USAP pool.
         *
         * @hide for internal use only
         */
        String USAP_POOL_SIZE_MAX = "usap_pool_size_max";

        /**
         * The minimum number of processes to keep in the USAP pool.
         *
         * @hide for internal use only
         */
        String USAP_POOL_SIZE_MIN = "usap_pool_size_min";

        /**
         * The threshold used to determine if the pool should be refilled.
         *
         * @hide for internal use only
         */
        String USAP_POOL_REFILL_THRESHOLD = "usap_refill_threshold";
    }
    public static final String NAMESPACE_TEXTCLASSIFIER = "textclassifier";

    /**
     * Privacy related properties definitions.
+7 −3
Original line number Diff line number Diff line
@@ -83,6 +83,10 @@ public abstract class LayoutInflater {
    private static final boolean DEBUG = false;

    private static final String COMPILED_VIEW_DEX_FILE_NAME = "/compiled_view.dex";
    /**
     * Whether or not we use the precompiled layout.
     */
    private static final String USE_PRECOMPILED_LAYOUT = "view.precompiled_layout_enabled";

    /** Empty stack trace used to avoid log spam in re-throw exceptions. */
    private static final StackTraceElement[] EMPTY_STACK_TRACE = new StackTraceElement[0];
@@ -416,15 +420,15 @@ public abstract class LayoutInflater {
        String usePrecompiledLayout = null;
        try {
            usePrecompiledLayout = DeviceConfig.getProperty(
                    DeviceConfig.Runtime.NAMESPACE,
                    DeviceConfig.Runtime.USE_PRECOMPILED_LAYOUT);
                    DeviceConfig.NAMESPACE_RUNTIME,
                    USE_PRECOMPILED_LAYOUT);
        } catch (Exception e) {
          // May be caused by permission errors reading the property (i.e. instant apps).
        }
        boolean enabled = false;
        if (TextUtils.isEmpty(usePrecompiledLayout)) {
            enabled = SystemProperties.getBoolean(
                    DeviceConfig.Runtime.USE_PRECOMPILED_LAYOUT,
                    USE_PRECOMPILED_LAYOUT,
                    false);
        } else {
            enabled = Boolean.parseBoolean(usePrecompiledLayout);
+2 −2
Original line number Diff line number Diff line
@@ -412,7 +412,7 @@ public final class Zygote {
        return SystemProperties.get(
                String.join(".",
                        "persist.device_config",
                        DeviceConfig.RuntimeNative.NAMESPACE,
                        DeviceConfig.NAMESPACE_RUNTIME_NATIVE,
                        propertyName),
                defaultValue);
    }
@@ -440,7 +440,7 @@ public final class Zygote {
        return SystemProperties.getBoolean(
                String.join(".",
                        "persist.device_config",
                        DeviceConfig.RuntimeNative.NAMESPACE,
                        DeviceConfig.NAMESPACE_RUNTIME_NATIVE,
                        propertyName),
                defaultValue);
    }
Loading