Loading packages/SystemUI/src/com/android/systemui/notetask/NoteTaskController.kt +2 −11 Original line number Diff line number Diff line Loading @@ -187,25 +187,16 @@ constructor( companion object { val TAG = NoteTaskController::class.simpleName.orEmpty() // TODO(b/254604589): Use final KeyEvent.KEYCODE_* instead. const val NOTE_TASK_KEY_EVENT = 311 // TODO(b/265912743): Use Intent.ACTION_CREATE_NOTE instead. const val ACTION_CREATE_NOTE = "android.intent.action.CREATE_NOTE" // TODO(b/265912743): Use Intent.INTENT_EXTRA_USE_STYLUS_MODE instead. const val INTENT_EXTRA_USE_STYLUS_MODE = "android.intent.extra.USE_STYLUS_MODE" } } private fun createNoteIntent(info: NoteTaskInfo): Intent = Intent(NoteTaskController.ACTION_CREATE_NOTE).apply { Intent(Intent.ACTION_CREATE_NOTE).apply { setPackage(info.packageName) // EXTRA_USE_STYLUS_MODE does not mean a stylus is in-use, but a stylus entrypoint // was used to start it. putExtra(NoteTaskController.INTENT_EXTRA_USE_STYLUS_MODE, true) putExtra(Intent.EXTRA_USE_STYLUS_MODE, true) addFlags(FLAG_ACTIVITY_NEW_TASK) // We should ensure the note experience can be open both as a full screen (lock screen) Loading packages/SystemUI/src/com/android/systemui/notetask/NoteTaskInfoResolver.kt +0 −3 Original line number Diff line number Diff line Loading @@ -56,9 +56,6 @@ constructor( companion object { private val TAG = NoteTaskInfoResolver::class.simpleName.orEmpty() // TODO(b/265912743): Use RoleManager.NOTES_ROLE instead. const val ROLE_NOTES = "android.app.role.NOTES" private val EMPTY_APPLICATION_INFO_FLAGS = ApplicationInfoFlags.of(0)!! /** Loading packages/SystemUI/tests/src/com/android/systemui/notetask/NoteTaskControllerTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -454,7 +454,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { val intentCaptor = argumentCaptor<Intent>() verify(bubbles).showOrHideAppBubble(capture(intentCaptor)) intentCaptor.value.let { intent -> assertThat(intent.action).isEqualTo(NoteTaskController.ACTION_CREATE_NOTE) assertThat(intent.action).isEqualTo(Intent.ACTION_CREATE_NOTE) assertThat(intent.`package`).isEqualTo(NOTES_PACKAGE_NAME) assertThat(intent.flags).isEqualTo(FLAG_ACTIVITY_NEW_TASK) assertThat(intent.getBooleanExtra(Intent.EXTRA_USE_STYLUS_MODE, false)).isTrue() Loading @@ -481,7 +481,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { val intentCaptor = argumentCaptor<Intent>() verify(bubbles).showOrHideAppBubble(capture(intentCaptor)) intentCaptor.value.let { intent -> assertThat(intent.action).isEqualTo(NoteTaskController.ACTION_CREATE_NOTE) assertThat(intent.action).isEqualTo(Intent.ACTION_CREATE_NOTE) assertThat(intent.`package`).isEqualTo(NOTES_PACKAGE_NAME) assertThat(intent.flags).isEqualTo(FLAG_ACTIVITY_NEW_TASK) assertThat(intent.getBooleanExtra(Intent.EXTRA_USE_STYLUS_MODE, false)).isTrue() Loading Loading
packages/SystemUI/src/com/android/systemui/notetask/NoteTaskController.kt +2 −11 Original line number Diff line number Diff line Loading @@ -187,25 +187,16 @@ constructor( companion object { val TAG = NoteTaskController::class.simpleName.orEmpty() // TODO(b/254604589): Use final KeyEvent.KEYCODE_* instead. const val NOTE_TASK_KEY_EVENT = 311 // TODO(b/265912743): Use Intent.ACTION_CREATE_NOTE instead. const val ACTION_CREATE_NOTE = "android.intent.action.CREATE_NOTE" // TODO(b/265912743): Use Intent.INTENT_EXTRA_USE_STYLUS_MODE instead. const val INTENT_EXTRA_USE_STYLUS_MODE = "android.intent.extra.USE_STYLUS_MODE" } } private fun createNoteIntent(info: NoteTaskInfo): Intent = Intent(NoteTaskController.ACTION_CREATE_NOTE).apply { Intent(Intent.ACTION_CREATE_NOTE).apply { setPackage(info.packageName) // EXTRA_USE_STYLUS_MODE does not mean a stylus is in-use, but a stylus entrypoint // was used to start it. putExtra(NoteTaskController.INTENT_EXTRA_USE_STYLUS_MODE, true) putExtra(Intent.EXTRA_USE_STYLUS_MODE, true) addFlags(FLAG_ACTIVITY_NEW_TASK) // We should ensure the note experience can be open both as a full screen (lock screen) Loading
packages/SystemUI/src/com/android/systemui/notetask/NoteTaskInfoResolver.kt +0 −3 Original line number Diff line number Diff line Loading @@ -56,9 +56,6 @@ constructor( companion object { private val TAG = NoteTaskInfoResolver::class.simpleName.orEmpty() // TODO(b/265912743): Use RoleManager.NOTES_ROLE instead. const val ROLE_NOTES = "android.app.role.NOTES" private val EMPTY_APPLICATION_INFO_FLAGS = ApplicationInfoFlags.of(0)!! /** Loading
packages/SystemUI/tests/src/com/android/systemui/notetask/NoteTaskControllerTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -454,7 +454,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { val intentCaptor = argumentCaptor<Intent>() verify(bubbles).showOrHideAppBubble(capture(intentCaptor)) intentCaptor.value.let { intent -> assertThat(intent.action).isEqualTo(NoteTaskController.ACTION_CREATE_NOTE) assertThat(intent.action).isEqualTo(Intent.ACTION_CREATE_NOTE) assertThat(intent.`package`).isEqualTo(NOTES_PACKAGE_NAME) assertThat(intent.flags).isEqualTo(FLAG_ACTIVITY_NEW_TASK) assertThat(intent.getBooleanExtra(Intent.EXTRA_USE_STYLUS_MODE, false)).isTrue() Loading @@ -481,7 +481,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { val intentCaptor = argumentCaptor<Intent>() verify(bubbles).showOrHideAppBubble(capture(intentCaptor)) intentCaptor.value.let { intent -> assertThat(intent.action).isEqualTo(NoteTaskController.ACTION_CREATE_NOTE) assertThat(intent.action).isEqualTo(Intent.ACTION_CREATE_NOTE) assertThat(intent.`package`).isEqualTo(NOTES_PACKAGE_NAME) assertThat(intent.flags).isEqualTo(FLAG_ACTIVITY_NEW_TASK) assertThat(intent.getBooleanExtra(Intent.EXTRA_USE_STYLUS_MODE, false)).isTrue() Loading