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

Commit 83a6070d authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Use `ro.boot.qemu` to check if the device is an emulator" am:...

Merge "Use `ro.boot.qemu` to check if the device is an emulator" am: 62d82e0b am: 4ba8fde9 am: de535f6e

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625662

Change-Id: Ia613c23fb779697882f9928b15684fb1ff97e9cd
parents dc8f8d8b de535f6e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ public class Build {
     */
    @UnsupportedAppUsage
    @TestApi
    public static final boolean IS_EMULATOR = getString("ro.kernel.qemu").equals("1");
    public static final boolean IS_EMULATOR = getString("ro.boot.qemu").equals("1");

    /**
     * A hardware serial number, if available. Alphanumeric only, case-insensitive.
+1 −1
Original line number Diff line number Diff line
@@ -126,7 +126,7 @@ bool Properties::load() {
    SkAndroidFrameworkTraceUtil::setEnableTracing(
            base::GetBoolProperty(PROPERTY_SKIA_ATRACE_ENABLED, false));

    runningInEmulator = base::GetBoolProperty(PROPERTY_QEMU_KERNEL, false);
    runningInEmulator = base::GetBoolProperty(PROPERTY_IS_EMULATOR, false);

    return (prevDebugLayersUpdates != debugLayersUpdates) || (prevDebugOverdraw != debugOverdraw);
}
+1 −1
Original line number Diff line number Diff line
@@ -160,7 +160,7 @@ enum DebugLevel {
/**
 * Property for whether this is running in the emulator.
 */
#define PROPERTY_QEMU_KERNEL "ro.kernel.qemu"
#define PROPERTY_IS_EMULATOR "ro.boot.qemu"

///////////////////////////////////////////////////////////////////////////////
// Misc
+2 −2
Original line number Diff line number Diff line
@@ -2445,8 +2445,8 @@ class DatabaseHelper extends SQLiteOpenHelper {
                    R.bool.def_auto_time_zone); // Sync timezone to NITZ

            loadSetting(stmt, Settings.Global.STAY_ON_WHILE_PLUGGED_IN,
                    ("1".equals(SystemProperties.get("ro.kernel.qemu")) ||
                        res.getBoolean(R.bool.def_stay_on_while_plugged_in))
                    ("1".equals(SystemProperties.get("ro.boot.qemu"))
                        || res.getBoolean(R.bool.def_stay_on_while_plugged_in))
                     ? 1 : 0);

            loadIntegerSetting(stmt, Settings.Global.WIFI_SLEEP_POLICY,
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ public class ClipboardService extends SystemService {

    private static final String TAG = "ClipboardService";
    private static final boolean IS_EMULATOR =
        SystemProperties.getBoolean("ro.kernel.qemu", false);
            SystemProperties.getBoolean("ro.boot.qemu", false);

    // DeviceConfig properties
    private static final String PROPERTY_SHOW_ACCESS_NOTIFICATIONS = "show_access_notifications";
Loading