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

Commit 16c116df authored by Felipe Leme's avatar Felipe Leme Committed by android-build-merger
Browse files

Merge "Merge "Minor improvements on voice interaction workflows." into qt-dev...

Merge "Merge "Minor improvements on voice interaction workflows." into qt-dev am: 7aa28bd5 am: 729b6b43" into qt-r1-dev-plus-aosp
am: 0f50e319

Change-Id: I3aeccbbe16d4d7aa2b8a897d2d0432892f4e1b70
parents 55117865 0f50e319
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -3554,11 +3554,13 @@ public final class ActivityThread extends ClientTransactionHandler {
            @NonNull RemoteCallback callback) {
            @NonNull RemoteCallback callback) {
        final ActivityClientRecord r = mActivities.get(activityToken);
        final ActivityClientRecord r = mActivities.get(activityToken);
        if (r == null) {
        if (r == null) {
            Log.w(TAG, "requestDirectActions(): no activity for " + activityToken);
            callback.sendResult(null);
            callback.sendResult(null);
            return;
            return;
        }
        }
        final int lifecycleState = r.getLifecycleState();
        final int lifecycleState = r.getLifecycleState();
        if (lifecycleState < ON_START || lifecycleState >= ON_STOP) {
        if (lifecycleState < ON_START || lifecycleState >= ON_STOP) {
            Log.w(TAG, "requestDirectActions(" + r + "): wrong lifecycle: " + lifecycleState);
            callback.sendResult(null);
            callback.sendResult(null);
            return;
            return;
        }
        }
+7 −1
Original line number Original line Diff line number Diff line
@@ -1452,7 +1452,13 @@ public class AudioService extends IAudioService.Stub
                        Settings.Secure.ASSISTANT, UserHandle.USER_CURRENT);
                        Settings.Secure.ASSISTANT, UserHandle.USER_CURRENT);
            }
            }
            if (!TextUtils.isEmpty(assistantName)) {
            if (!TextUtils.isEmpty(assistantName)) {
                packageName = ComponentName.unflattenFromString(assistantName).getPackageName();
                ComponentName componentName = ComponentName.unflattenFromString(assistantName);
                if (componentName == null) {
                    Slog.w(TAG, "Invalid service name for "
                            + Settings.Secure.VOICE_INTERACTION_SERVICE + ": " + assistantName);
                    return;
                }
                packageName = componentName.getPackageName();
            }
            }
        }
        }
        if (!TextUtils.isEmpty(packageName)) {
        if (!TextUtils.isEmpty(packageName)) {