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

Commit 06ac707d authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Android Git Automerger
Browse files

am c6767354: Merge "Add setting to disable assist data (1/2)" into mnc-dev

* commit 'c6767354': (30 commits)
  Add setting to disable assist data (1/2)
  Make all icon fields & extras sent to listeners backward-compatible.
  Revert "Fix IMMS#mInputShown state inconsistency."
  Fix bug with jobservice context giving wrong value
  camera2: Fix work-profile eviction handling.
  Fix missing break in Icon class
  Fix post dial for remote connections
  Fix build: udpate parser factory method
  Don't keep LayoutlibCallback reference.
  Adjust lockscreen style to spec
  [RenderScript] Add dummy getMinorID to maintain compatible with old RS compat lib.
  Change the location of Brandmaster statement file.
  Revert "Update IME focus when the active view is losing the focus."
  Revert "Icon support comes to Notification."
  Fix icon-related crash.
  Don't display the "no Internet access" prompt on captive portals.
  Rewriting should fail when any paths are null.
  Ignore abandon after install relinquished.
  Fix build - Revert "Revert "Use default constructor to get anti-aliasing""
  Fix crash in setup wizard
  ...
parents 0427cf9a c6767354
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -5416,6 +5416,14 @@ public final class Settings {
         */
        public static final String EMERGENCY_ASSISTANCE_APPLICATION = "emergency_assistance_application";

        /**
         * Specifies whether the current app context on scren (assist data) will be sent to the
         * assist application (active voice interaction service).
         *
         * @hide
         */
        public static final String ASSIST_STRUCTURE_ENABLED = "assist_structure_enabled";

        /**
         * Names of the packages that the current user has explicitly allowed to
         * see all of the user's notifications, separated by ':'.
+1 −0
Original line number Diff line number Diff line
@@ -208,6 +208,7 @@ public interface MetricsConstants {
    public static final int APPLICATIONS_USAGE_ACCESS_DETAIL = 183;
    public static final int APPLICATIONS_HIGH_POWER_APPS = 184;
    public static final int FUELGAUGE_HIGH_POWER_DETAILS = 185;
    public static final int APPLICATIONS_MANAGE_ASSIST = 186;

    //aliases
    public static final int DEVICEINFO_STORAGE = DEVICEINFO_MEMORY;
+8 −1
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ import android.os.IBinder;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.UserHandle;
import android.provider.Settings;
import android.service.voice.IVoiceInteractionSession;
import android.service.voice.IVoiceInteractionSessionService;
import android.service.voice.VoiceInteractionService;
@@ -192,7 +193,8 @@ final class VoiceInteractionSessionConnection implements ServiceConnection {
            mHaveAssistData = false;
            if ((flags&VoiceInteractionService.START_WITH_ASSIST) != 0) {
                if (mAppOps.noteOpNoThrow(AppOpsManager.OP_ASSIST_STRUCTURE, mCallingUid,
                        mSessionComponentName.getPackageName()) == AppOpsManager.MODE_ALLOWED) {
                        mSessionComponentName.getPackageName()) == AppOpsManager.MODE_ALLOWED
                        && isStructureEnabled()) {
                    try {
                        mAm.requestAssistContextExtras(ActivityManager.ASSIST_CONTEXT_FULL,
                                mAssistReceiver);
@@ -457,6 +459,11 @@ final class VoiceInteractionSessionConnection implements ServiceConnection {
        }
    }

    private boolean isStructureEnabled() {
        return Settings.Secure.getIntForUser(mContext.getContentResolver(),
                Settings.Secure.ASSIST_STRUCTURE_ENABLED, 1, mUser) != 0;
    }

    public void dump(String prefix, PrintWriter pw) {
        pw.print(prefix); pw.print("mToken="); pw.println(mToken);
        pw.print(prefix); pw.print("mShown="); pw.println(mShown);