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

Commit 03779f22 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add remote control of Instant Apps" into nyc-mr1-dev

parents 8e3293e8 d15bb75a
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -8701,6 +8701,16 @@ public final class Settings {
        public static final String EPHEMERAL_COOKIE_MAX_SIZE_BYTES =
                "ephemeral_cookie_max_size_bytes";

        /**
         * Toggle to enable/disable the entire ephemeral feature. By default, ephemeral is
         * enabled. Set to zero to disable.
         * <p>
         * Type: int (0 for false, 1 for true)
         *
         * @hide
         */
        public static final String ENABLE_EPHEMERAL_FEATURE = "enable_ephemeral_feature";

        /**
         * A mask applied to the ephemeral hash to generate the hash prefix.
         * <p>
+7 −1
Original line number Diff line number Diff line
@@ -109,6 +109,7 @@ import android.app.admin.SecurityLog;
import android.app.backup.IBackupManager;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
import android.content.IIntentReceiver;
import android.content.Intent;
@@ -4807,7 +4808,12 @@ public class PackageManagerService extends IPackageManager.Stub {
        if (!mSystemReady) {
            return true;
        }
        return Secure.getInt(mContext.getContentResolver(), Secure.WEB_ACTION_ENABLED, 1) == 0;
        // we can't get a content resolver until the system is ready; these checks must happen last
        final ContentResolver resolver = mContext.getContentResolver();
        if (Global.getInt(resolver, Global.ENABLE_EPHEMERAL_FEATURE, 1) == 0) {
            return true;
        }
        return Secure.getInt(resolver, Secure.WEB_ACTION_ENABLED, 1) == 0;
    }
    private boolean isEphemeralAllowed(