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

Commit 0a6b89a4 authored by Marcello Galhardo's avatar Marcello Galhardo Committed by Automerger Merge Worker
Browse files

RESTRICT AUTOMERGE Support split-mode on Note Shortcut am: a896a94e

parents 1a2a6c26 a896a94e
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -996,7 +996,6 @@
            android:name=".notetask.shortcut.LaunchNoteTaskActivity"
            android:name=".notetask.shortcut.LaunchNoteTaskActivity"
            android:exported="true"
            android:exported="true"
            android:excludeFromRecents="true"
            android:excludeFromRecents="true"
            android:resizeableActivity="false"
            android:theme="@android:style/Theme.NoDisplay" >
            android:theme="@android:style/Theme.NoDisplay" >


            <intent-filter>
            <intent-filter>
@@ -1012,7 +1011,6 @@
            android:exported="false"
            android:exported="false"
            android:enabled="true"
            android:enabled="true"
            android:excludeFromRecents="true"
            android:excludeFromRecents="true"
            android:resizeableActivity="false"
            android:theme="@android:style/Theme.NoDisplay" />
            android:theme="@android:style/Theme.NoDisplay" />


        <activity
        <activity
+1 −1
Original line number Original line Diff line number Diff line
@@ -215,7 +215,7 @@ constructor(
                    debugLog { "onShowNoteTask - opened as app bubble: $info" }
                    debugLog { "onShowNoteTask - opened as app bubble: $info" }
                }
                }
                is NoteTaskLaunchMode.Activity -> {
                is NoteTaskLaunchMode.Activity -> {
                    if (activityManager.isInForeground(info.packageName)) {
                    if (info.isKeyguardLocked && activityManager.isInForeground(info.packageName)) {
                        // Force note task into background by calling home.
                        // Force note task into background by calling home.
                        val intent = createHomeIntent()
                        val intent = createHomeIntent()
                        context.startActivityAsUser(intent, user)
                        context.startActivityAsUser(intent, user)
+4 −2
Original line number Original line Diff line number Diff line
@@ -25,12 +25,14 @@ import com.android.systemui.screenshot.appclips.AppClipsTrampolineActivity
 * An entry point represents where the note task has ben called from. In rare cases, it may
 * An entry point represents where the note task has ben called from. In rare cases, it may
 * represent a "re-entry" (i.e., [APP_CLIPS]).
 * represent a "re-entry" (i.e., [APP_CLIPS]).
 */
 */
enum class
enum class NoteTaskEntryPoint {
NoteTaskEntryPoint {


    /** @see [LaunchNoteTaskActivity] */
    /** @see [LaunchNoteTaskActivity] */
    WIDGET_PICKER_SHORTCUT,
    WIDGET_PICKER_SHORTCUT,


    /** @see [LaunchNoteTaskActivity] */
    WIDGET_PICKER_SHORTCUT_IN_MULTI_WINDOW_MODE,

    /** @see [NoteTaskQuickAffordanceConfig] */
    /** @see [NoteTaskQuickAffordanceConfig] */
    QUICK_AFFORDANCE,
    QUICK_AFFORDANCE,


+31 −24
Original line number Original line Diff line number Diff line
@@ -22,6 +22,8 @@ import com.android.systemui.notetask.NoteTaskEntryPoint.KEYBOARD_SHORTCUT
import com.android.systemui.notetask.NoteTaskEntryPoint.QUICK_AFFORDANCE
import com.android.systemui.notetask.NoteTaskEntryPoint.QUICK_AFFORDANCE
import com.android.systemui.notetask.NoteTaskEntryPoint.TAIL_BUTTON
import com.android.systemui.notetask.NoteTaskEntryPoint.TAIL_BUTTON
import com.android.systemui.notetask.NoteTaskEntryPoint.WIDGET_PICKER_SHORTCUT
import com.android.systemui.notetask.NoteTaskEntryPoint.WIDGET_PICKER_SHORTCUT
import com.android.systemui.notetask.NoteTaskEntryPoint.WIDGET_PICKER_SHORTCUT_IN_MULTI_WINDOW_MODE
import com.android.systemui.notetask.NoteTaskEventLogger.NoteTaskUiEvent
import com.android.systemui.notetask.NoteTaskEventLogger.NoteTaskUiEvent.NOTE_OPENED_VIA_KEYGUARD_QUICK_AFFORDANCE
import com.android.systemui.notetask.NoteTaskEventLogger.NoteTaskUiEvent.NOTE_OPENED_VIA_KEYGUARD_QUICK_AFFORDANCE
import com.android.systemui.notetask.NoteTaskEventLogger.NoteTaskUiEvent.NOTE_OPENED_VIA_SHORTCUT
import com.android.systemui.notetask.NoteTaskEventLogger.NoteTaskUiEvent.NOTE_OPENED_VIA_SHORTCUT
import com.android.systemui.notetask.NoteTaskEventLogger.NoteTaskUiEvent.NOTE_OPENED_VIA_STYLUS_TAIL_BUTTON
import com.android.systemui.notetask.NoteTaskEventLogger.NoteTaskUiEvent.NOTE_OPENED_VIA_STYLUS_TAIL_BUTTON
@@ -49,10 +51,13 @@ class NoteTaskEventLogger @Inject constructor(private val uiEventLogger: UiEvent
                            NOTE_OPENED_VIA_STYLUS_TAIL_BUTTON
                            NOTE_OPENED_VIA_STYLUS_TAIL_BUTTON
                        }
                        }
                    }
                    }
                WIDGET_PICKER_SHORTCUT -> NOTE_OPENED_VIA_SHORTCUT

                    WIDGET_PICKER_SHORTCUT,
                    WIDGET_PICKER_SHORTCUT_IN_MULTI_WINDOW_MODE -> NOTE_OPENED_VIA_SHORTCUT

                    QUICK_AFFORDANCE -> NOTE_OPENED_VIA_KEYGUARD_QUICK_AFFORDANCE
                    QUICK_AFFORDANCE -> NOTE_OPENED_VIA_KEYGUARD_QUICK_AFFORDANCE
                APP_CLIPS -> return
                    APP_CLIPS,
                KEYBOARD_SHORTCUT -> return
                    KEYBOARD_SHORTCUT,
                    null -> return
                    null -> return
                }
                }
        uiEventLogger.log(event, info.uid, info.packageName)
        uiEventLogger.log(event, info.uid, info.packageName)
@@ -69,10 +74,12 @@ class NoteTaskEventLogger @Inject constructor(private val uiEventLogger: UiEvent
                            NoteTaskUiEvent.NOTE_CLOSED_VIA_STYLUS_TAIL_BUTTON
                            NoteTaskUiEvent.NOTE_CLOSED_VIA_STYLUS_TAIL_BUTTON
                        }
                        }
                    }
                    }
                WIDGET_PICKER_SHORTCUT -> return

                QUICK_AFFORDANCE -> return
                    WIDGET_PICKER_SHORTCUT,
                APP_CLIPS -> return
                    WIDGET_PICKER_SHORTCUT_IN_MULTI_WINDOW_MODE,
                KEYBOARD_SHORTCUT -> return
                    QUICK_AFFORDANCE,
                    APP_CLIPS,
                    KEYBOARD_SHORTCUT,
                    null -> return
                    null -> return
                }
                }
        uiEventLogger.log(event, info.uid, info.packageName)
        uiEventLogger.log(event, info.uid, info.packageName)
+2 −1
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@
package com.android.systemui.notetask
package com.android.systemui.notetask


import android.os.UserHandle
import android.os.UserHandle
import com.android.systemui.notetask.NoteTaskEntryPoint.WIDGET_PICKER_SHORTCUT_IN_MULTI_WINDOW_MODE


/** Contextual information required to launch a Note Task by [NoteTaskController]. */
/** Contextual information required to launch a Note Task by [NoteTaskController]. */
data class NoteTaskInfo(
data class NoteTaskInfo(
@@ -27,7 +28,7 @@ data class NoteTaskInfo(
) {
) {


    val launchMode: NoteTaskLaunchMode =
    val launchMode: NoteTaskLaunchMode =
        if (isKeyguardLocked) {
        if (isKeyguardLocked || entryPoint == WIDGET_PICKER_SHORTCUT_IN_MULTI_WINDOW_MODE) {
            NoteTaskLaunchMode.Activity
            NoteTaskLaunchMode.Activity
        } else {
        } else {
            NoteTaskLaunchMode.AppBubble
            NoteTaskLaunchMode.AppBubble
Loading