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

Commit dddbf380 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "[NGA v2] Reliable Visible Activity Lookup" into sc-v2-dev am: 80fcbc8f am: 347557e9

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

Change-Id: I4a5b0c551343984de6124a497f7b24dd750c5aca
parents 31c54098 347557e9
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -39102,6 +39102,13 @@ package android.service.textservice {
package android.service.voice {
  public final class VisibleActivityInfo implements android.os.Parcelable {
    method public int describeContents();
    method @NonNull public android.service.voice.VoiceInteractionSession.ActivityId getActivityId();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.service.voice.VisibleActivityInfo> CREATOR;
  }
  public class VoiceInteractionService extends android.app.Service {
    ctor public VoiceInteractionService();
    method public int getDisabledShowContext();
@@ -39163,6 +39170,7 @@ package android.service.voice {
    method public void onTaskStarted(android.content.Intent, int);
    method public void onTrimMemory(int);
    method public final void performDirectAction(@NonNull android.app.DirectAction, @Nullable android.os.Bundle, @Nullable android.os.CancellationSignal, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<android.os.Bundle>);
    method public final void registerVisibleActivityCallback(@NonNull java.util.concurrent.Executor, @NonNull android.service.voice.VoiceInteractionSession.VisibleActivityCallback);
    method public final void requestDirectActions(@NonNull android.service.voice.VoiceInteractionSession.ActivityId, @Nullable android.os.CancellationSignal, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.util.List<android.app.DirectAction>>);
    method public void setContentView(android.view.View);
    method public void setDisabledShowContext(int);
@@ -39172,6 +39180,7 @@ package android.service.voice {
    method public void show(android.os.Bundle, int);
    method public void startAssistantActivity(android.content.Intent);
    method public void startVoiceActivity(android.content.Intent);
    method public final void unregisterVisibleActivityCallback(@NonNull android.service.voice.VoiceInteractionSession.VisibleActivityCallback);
    field public static final int SHOW_SOURCE_ACTIVITY = 16; // 0x10
    field public static final int SHOW_SOURCE_APPLICATION = 8; // 0x8
    field public static final int SHOW_SOURCE_ASSIST_GESTURE = 4; // 0x4
@@ -39245,6 +39254,11 @@ package android.service.voice {
    method public boolean isActive();
  }
  public static interface VoiceInteractionSession.VisibleActivityCallback {
    method public default void onInvisible(@NonNull android.service.voice.VoiceInteractionSession.ActivityId);
    method public default void onVisible(@NonNull android.service.voice.VisibleActivityInfo);
  }
  public abstract class VoiceInteractionSessionService extends android.app.Service {
    ctor public VoiceInteractionSessionService();
    method public android.os.IBinder onBind(android.content.Intent);
+4 −0
Original line number Diff line number Diff line
@@ -2414,6 +2414,10 @@ package android.service.voice {
    method @RequiresPermission(allOf={android.Manifest.permission.RECORD_AUDIO, android.Manifest.permission.CAPTURE_AUDIO_HOTWORD}) public void triggerHardwareRecognitionEventForTest(int, int, boolean, int, int, int, boolean, @NonNull android.media.AudioFormat, @Nullable byte[]);
  }

  public final class VisibleActivityInfo implements android.os.Parcelable {
    ctor public VisibleActivityInfo(int, @NonNull android.os.IBinder);
  }

}

package android.service.watchdog {
+19 −0
Original line number Diff line number Diff line
@@ -672,4 +672,23 @@ public abstract class ActivityManagerInternal {
    public abstract int sendIntentSender(IIntentSender target, IBinder allowlistToken, int code,
            Intent intent, String resolvedType,
            IIntentReceiver finishedReceiver, String requiredPermission, Bundle options);

    /**
     * Sets the provider to communicate between voice interaction manager service and
     * ActivityManagerService.
     */
    public abstract void setVoiceInteractionManagerProvider(
            @Nullable VoiceInteractionManagerProvider provider);

    /**
     * Provides the interface to communicate between voice interaction manager service and
     * ActivityManagerService.
     */
    public interface VoiceInteractionManagerProvider {
        /**
         * Notifies the service when a high-level activity event has been changed, for example,
         * an activity was resumed or stopped.
         */
        void notifyActivityEventChanged();
    }
}
+2 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.IBinder;
import android.service.voice.VisibleActivityInfo;

import com.android.internal.app.IVoiceInteractionSessionShowCallback;

@@ -39,4 +40,5 @@ oneway interface IVoiceInteractionSession {
    void closeSystemDialogs();
    void onLockscreenShown();
    void destroy();
    void updateVisibleActivityInfo(in VisibleActivityInfo visibleActivityInfo, int type);
}
+19 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2021 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.service.voice;

parcelable VisibleActivityInfo;
Loading