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

Commit d15bb75a authored by Todd Kennedy's avatar Todd Kennedy
Browse files

Add remote control of Instant Apps

Bug: 31470039
Test: manual
Change-Id: I82eb47f4d24fb88d0f264eca1176aec55364867c
parent 82f050f7
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -8673,6 +8673,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(