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

Commit f1a5b6e0 authored by Michael Groover's avatar Michael Groover Committed by Android (Google) Code Review
Browse files

Merge changes from topic "SensorPrivacyMode"

* changes:
  Add SensorPrivacy constants to SettingsBackupTest
  Prototype Spaceship mode qstile
parents a567e657 ecedd070
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -207,6 +207,8 @@ java_defaults {
        "core/java/android/hardware/usb/IUsbSerialReader.aidl",
        "core/java/android/net/ICaptivePortal.aidl",
        "core/java/android/net/IConnectivityManager.aidl",
        "core/java/android/hardware/ISensorPrivacyListener.aidl",
        "core/java/android/hardware/ISensorPrivacyManager.aidl",
        "core/java/android/net/IIpConnectivityMetrics.aidl",
        "core/java/android/net/IEthernetManager.aidl",
        "core/java/android/net/IEthernetServiceListener.aidl",
+1 −0
Original line number Diff line number Diff line
@@ -93,6 +93,7 @@ package android {
    field public static final java.lang.String MANAGE_DEVICE_ADMINS = "android.permission.MANAGE_DEVICE_ADMINS";
    field public static final java.lang.String MANAGE_IPSEC_TUNNELS = "android.permission.MANAGE_IPSEC_TUNNELS";
    field public static final java.lang.String MANAGE_ROLE_HOLDERS = "android.permission.MANAGE_ROLE_HOLDERS";
    field public static final java.lang.String MANAGE_SENSOR_PRIVACY = "android.permission.MANAGE_SENSOR_PRIVACY";
    field public static final java.lang.String MANAGE_SOUND_TRIGGER = "android.permission.MANAGE_SOUND_TRIGGER";
    field public static final java.lang.String MANAGE_SUBSCRIPTION_PLANS = "android.permission.MANAGE_SUBSCRIPTION_PLANS";
    field public static final java.lang.String MANAGE_USB = "android.permission.MANAGE_USB";
+8 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ import android.debug.IAdbManager;
import android.hardware.ConsumerIrManager;
import android.hardware.ISerialManager;
import android.hardware.SensorManager;
import android.hardware.SensorPrivacyManager;
import android.hardware.SerialManager;
import android.hardware.SystemSensorManager;
import android.hardware.biometrics.BiometricManager;
@@ -503,6 +504,13 @@ final class SystemServiceRegistry {
                  ctx.mMainThread.getHandler().getLooper());
            }});

        registerService(Context.SENSOR_PRIVACY_SERVICE, SensorPrivacyManager.class,
                new CachedServiceFetcher<SensorPrivacyManager>() {
                    @Override
                    public SensorPrivacyManager createService(ContextImpl ctx) {
                        return SensorPrivacyManager.getInstance(ctx);
                    }});

        registerService(Context.STATS_MANAGER, StatsManager.class,
                new CachedServiceFetcher<StatsManager>() {
            @Override
+13 −0
Original line number Diff line number Diff line
@@ -3080,6 +3080,7 @@ public abstract class Context {
            //@hide: COUNTRY_DETECTOR,
            SEARCH_SERVICE,
            SENSOR_SERVICE,
            SENSOR_PRIVACY_SERVICE,
            STORAGE_SERVICE,
            STORAGE_STATS_SERVICE,
            WALLPAPER_SERVICE,
@@ -3542,6 +3543,18 @@ public abstract class Context {
     */
    public static final String SENSOR_SERVICE = "sensor";

    /**
     * Use with {@link #getSystemService(String)} to retrieve a {@link
     * android.hardware.SensorPrivacyManager} for accessing sensor privacy
     * functions.
     *
     * @see #getSystemService(String)
     * @see android.hardware.SensorPrivacyManager
     *
     * @hide
     */
    public static final String SENSOR_PRIVACY_SERVICE = "sensor_privacy";

    /**
     * Use with {@link #getSystemService(String)} to retrieve a {@link
     * android.os.storage.StorageManager} for accessing system storage
+29 −0
Original line number Diff line number Diff line
/**
 * Copyright (c) 2018, The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware;

/**
 * @hide
 */
oneway interface ISensorPrivacyListener {
    // Since these transactions are also called from native code, these must be kept in sync with
    // the ones in
    //   frameworks/native/libs/sensorprivacy/aidl/android/hardware/ISensorPrivacyListener.aidl
    // =============== Beginning of transactions used on native side as well ======================
    void onSensorPrivacyChanged(boolean enabled);
    // =============== End of transactions used on native side as well ============================
}
Loading