diff --git a/packages/SystemUI/src/com/android/systemui/notetask/NoteTaskController.kt b/packages/SystemUI/src/com/android/systemui/notetask/NoteTaskController.kt index 5b36e93ec5e1a..6cd04c861155e 100644 --- a/packages/SystemUI/src/com/android/systemui/notetask/NoteTaskController.kt +++ b/packages/SystemUI/src/com/android/systemui/notetask/NoteTaskController.kt @@ -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) diff --git a/packages/SystemUI/src/com/android/systemui/notetask/NoteTaskInfoResolver.kt b/packages/SystemUI/src/com/android/systemui/notetask/NoteTaskInfoResolver.kt index 7be491f0b3a62..b98a0fd75331c 100644 --- a/packages/SystemUI/src/com/android/systemui/notetask/NoteTaskInfoResolver.kt +++ b/packages/SystemUI/src/com/android/systemui/notetask/NoteTaskInfoResolver.kt @@ -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)!! /** diff --git a/packages/SystemUI/tests/src/com/android/systemui/notetask/NoteTaskControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/notetask/NoteTaskControllerTest.kt index 4efc30f0aee29..608d809e7e56f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/notetask/NoteTaskControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/notetask/NoteTaskControllerTest.kt @@ -454,7 +454,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { val intentCaptor = argumentCaptor() 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() @@ -481,7 +481,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { val intentCaptor = argumentCaptor() 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()