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

Commit de2238d3 authored by Liana Kazanova's avatar Liana Kazanova Committed by Automerger Merge Worker
Browse files

Merge "Revert "[hotword] make service exemption configurable via sysprop""...

Merge "Revert "[hotword] make service exemption configurable via sysprop"" into udc-dev am: 11cd4696

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



Change-Id: I53c3656096a0f3bf6e43c47d31b949ec0e901703
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 1a3e095a 11cd4696
Loading
Loading
Loading
Loading
+2 −8
Original line number Original line Diff line number Diff line
@@ -37,7 +37,6 @@ import android.os.Bundle;
import android.os.IBinder;
import android.os.IBinder;
import android.os.PackageTagsList;
import android.os.PackageTagsList;
import android.os.Process;
import android.os.Process;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserHandle;
import android.service.voice.VoiceInteractionManagerInternal;
import android.service.voice.VoiceInteractionManagerInternal;
import android.service.voice.VoiceInteractionManagerInternal.HotwordDetectionServiceIdentity;
import android.service.voice.VoiceInteractionManagerInternal.HotwordDetectionServiceIdentity;
@@ -69,8 +68,6 @@ public final class AppOpsPolicy implements AppOpsManagerInternal.CheckOpsDelegat
    private static final String ACTIVITY_RECOGNITION_TAGS =
    private static final String ACTIVITY_RECOGNITION_TAGS =
            "android:activity_recognition_allow_listed_tags";
            "android:activity_recognition_allow_listed_tags";
    private static final String ACTIVITY_RECOGNITION_TAGS_SEPARATOR = ";";
    private static final String ACTIVITY_RECOGNITION_TAGS_SEPARATOR = ";";
    private static final boolean SYSPROP_HOTWORD_DETECTION_SERVICE_REQUIRED =
            SystemProperties.getBoolean("ro.hotword.detection_service_required", false);


    @NonNull
    @NonNull
    private final Object mLock = new Object();
    private final Object mLock = new Object();
@@ -204,11 +201,8 @@ public final class AppOpsPolicy implements AppOpsManagerInternal.CheckOpsDelegat


    private static boolean isHotwordDetectionServiceRequired(PackageManager pm) {
    private static boolean isHotwordDetectionServiceRequired(PackageManager pm) {
        // The HotwordDetectionService APIs aren't ready yet for Auto or TV.
        // The HotwordDetectionService APIs aren't ready yet for Auto or TV.
        if (pm.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)
        return !(pm.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)
                || pm.hasSystemFeature(PackageManager.FEATURE_LEANBACK)) {
                || pm.hasSystemFeature(PackageManager.FEATURE_LEANBACK));
            return false;
        }
        return SYSPROP_HOTWORD_DETECTION_SERVICE_REQUIRED;
    }
    }


    @Override
    @Override