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

Commit a501a021 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Add new voice request for picking from a list."

parents 2851d7d0 3d07c94c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -559,6 +559,7 @@ aidl_files := \
	frameworks/base/core/java/android/app/PendingIntent.aidl \
	frameworks/base/core/java/android/app/AlarmManager.aidl \
	frameworks/base/core/java/android/app/SearchableInfo.aidl \
	frameworks/base/core/java/android/app/VoiceInteractor.aidl \
	frameworks/base/core/java/android/app/job/JobParameters.aidl \
	frameworks/base/core/java/android/app/job/JobInfo.aidl \
	frameworks/base/core/java/android/appwidget/AppWidgetProviderInfo.aidl \
+21 −1
Original line number Diff line number Diff line
@@ -5355,8 +5355,25 @@ package android.app {
    method public void onConfirmationResult(boolean, android.os.Bundle);
  }
  public static class VoiceInteractor.PickOptionRequest extends android.app.VoiceInteractor.Request {
    ctor public VoiceInteractor.PickOptionRequest(java.lang.CharSequence, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
    method public void onPickOptionResult(boolean, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
  }
  public static final class VoiceInteractor.PickOptionRequest.Option implements android.os.Parcelable {
    ctor public VoiceInteractor.PickOptionRequest.Option(java.lang.CharSequence);
    method public android.app.VoiceInteractor.PickOptionRequest.Option addSynonym(java.lang.CharSequence);
    method public int countSynonyms();
    method public int describeContents();
    method public android.os.Bundle getExtras();
    method public java.lang.CharSequence getLabel();
    method public java.lang.CharSequence getSynonymAt(int);
    method public void setExtras(android.os.Bundle);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.VoiceInteractor.PickOptionRequest.Option> CREATOR;
  }
  public static abstract class VoiceInteractor.Request {
    ctor public VoiceInteractor.Request();
    method public void cancel();
    method public android.app.Activity getActivity();
    method public android.content.Context getContext();
@@ -27895,10 +27912,12 @@ package android.service.voice {
    method public boolean onKeyLongPress(int, android.view.KeyEvent);
    method public boolean onKeyMultiple(int, int, android.view.KeyEvent);
    method public boolean onKeyUp(int, android.view.KeyEvent);
    method public abstract void onPickOption(android.service.voice.VoiceInteractionSession.Caller, android.service.voice.VoiceInteractionSession.Request, java.lang.CharSequence, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
    method public void onShow(android.os.Bundle, int);
    method public void onTaskFinished(android.content.Intent, int);
    method public void onTaskStarted(android.content.Intent, int);
    method public void setContentView(android.view.View);
    method public void setKeepAwake(boolean);
    method public void setTheme(int);
    method public void show();
    method public void showWindow();
@@ -27924,6 +27943,7 @@ package android.service.voice {
    method public void sendCommandResult(boolean, android.os.Bundle);
    method public void sendCompleteVoiceResult(android.os.Bundle);
    method public void sendConfirmResult(boolean, android.os.Bundle);
    method public void sendPickOptionResult(boolean, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
  }
  public abstract class VoiceInteractionSessionService extends android.app.Service {
+21 −1
Original line number Diff line number Diff line
@@ -5445,8 +5445,25 @@ package android.app {
    method public void onConfirmationResult(boolean, android.os.Bundle);
  }
  public static class VoiceInteractor.PickOptionRequest extends android.app.VoiceInteractor.Request {
    ctor public VoiceInteractor.PickOptionRequest(java.lang.CharSequence, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
    method public void onPickOptionResult(boolean, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
  }
  public static final class VoiceInteractor.PickOptionRequest.Option implements android.os.Parcelable {
    ctor public VoiceInteractor.PickOptionRequest.Option(java.lang.CharSequence);
    method public android.app.VoiceInteractor.PickOptionRequest.Option addSynonym(java.lang.CharSequence);
    method public int countSynonyms();
    method public int describeContents();
    method public android.os.Bundle getExtras();
    method public java.lang.CharSequence getLabel();
    method public java.lang.CharSequence getSynonymAt(int);
    method public void setExtras(android.os.Bundle);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.VoiceInteractor.PickOptionRequest.Option> CREATOR;
  }
  public static abstract class VoiceInteractor.Request {
    ctor public VoiceInteractor.Request();
    method public void cancel();
    method public android.app.Activity getActivity();
    method public android.content.Context getContext();
@@ -29779,10 +29796,12 @@ package android.service.voice {
    method public boolean onKeyLongPress(int, android.view.KeyEvent);
    method public boolean onKeyMultiple(int, int, android.view.KeyEvent);
    method public boolean onKeyUp(int, android.view.KeyEvent);
    method public abstract void onPickOption(android.service.voice.VoiceInteractionSession.Caller, android.service.voice.VoiceInteractionSession.Request, java.lang.CharSequence, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
    method public void onShow(android.os.Bundle, int);
    method public void onTaskFinished(android.content.Intent, int);
    method public void onTaskStarted(android.content.Intent, int);
    method public void setContentView(android.view.View);
    method public void setKeepAwake(boolean);
    method public void setTheme(int);
    method public void show();
    method public void showWindow();
@@ -29808,6 +29827,7 @@ package android.service.voice {
    method public void sendCommandResult(boolean, android.os.Bundle);
    method public void sendCompleteVoiceResult(android.os.Bundle);
    method public void sendConfirmResult(boolean, android.os.Bundle);
    method public void sendPickOptionResult(boolean, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle);
  }
  public abstract class VoiceInteractionSessionService extends android.app.Service {
+24 −0
Original line number Diff line number Diff line
@@ -2440,6 +2440,16 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
            reply.writeNoException();
            return true;
        }

        case SET_VOICE_KEEP_AWAKE_TRANSACTION: {
            data.enforceInterface(IActivityManager.descriptor);
            IVoiceInteractionSession session = IVoiceInteractionSession.Stub.asInterface(
                    data.readStrongBinder());
            boolean keepAwake = data.readInt() != 0;
            setVoiceKeepAwake(session, keepAwake);
            reply.writeNoException();
            return true;
        }
        }

        return super.onTransact(code, data, reply, flags);
@@ -5658,5 +5668,19 @@ class ActivityManagerProxy implements IActivityManager
        reply.recycle();
    }

    @Override
    public void setVoiceKeepAwake(IVoiceInteractionSession session, boolean keepAwake)
            throws RemoteException {
        Parcel data = Parcel.obtain();
        Parcel reply = Parcel.obtain();
        data.writeInterfaceToken(IActivityManager.descriptor);
        data.writeStrongBinder(session.asBinder());
        data.writeInt(keepAwake ? 1 : 0);
        mRemote.transact(SET_VOICE_KEEP_AWAKE_TRANSACTION, data, reply, 0);
        reply.readException();
        data.recycle();
        reply.recycle();
    }

    private IBinder mRemote;
}
+4 −0
Original line number Diff line number Diff line
@@ -485,6 +485,9 @@ public interface IActivityManager extends IInterface {
    public void setDumpHeapDebugLimit(String processName, long maxMemSize) throws RemoteException;
    public void dumpHeapFinished(String path) throws RemoteException;

    public void setVoiceKeepAwake(IVoiceInteractionSession session, boolean keepAwake)
            throws RemoteException;

    /*
     * Private non-Binder interfaces
     */
@@ -818,4 +821,5 @@ public interface IActivityManager extends IInterface {
    int GET_LOCK_TASK_MODE_STATE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+286;
    int SET_DUMP_HEAP_DEBUG_LIMIT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+287;
    int DUMP_HEAP_FINISHED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+288;
    int SET_VOICE_KEEP_AWAKE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+289;
}
Loading