Loading packages/SystemUI/src/com/android/systemui/notetask/NoteTaskController.kt +4 −0 Original line number Diff line number Diff line Loading @@ -263,7 +263,11 @@ constructor( * If the shortcut entry `android:enabled` is set to `true`, the shortcut will be visible in the * Widget Picker to all users. */ // TODO(b/316332684) @Suppress("UNREACHABLE_CODE") fun setNoteTaskShortcutEnabled(value: Boolean, user: UserHandle) { return // shortcut should not be enabled until additional features are implemented. if (!userManager.isUserUnlocked(user)) { debugLog { "setNoteTaskShortcutEnabled call but user locked: user=$user" } return Loading packages/SystemUI/tests/src/com/android/systemui/notetask/NoteTaskControllerTest.kt +8 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.UnconfinedTestDispatcher import kotlinx.coroutines.test.runCurrent import org.junit.Before import org.junit.Ignore import org.junit.Test import org.junit.runner.RunWith import org.mockito.ArgumentMatchers.anyInt Loading Loading @@ -462,6 +463,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { // region setNoteTaskShortcutEnabled @Test @Ignore("b/316332684") fun setNoteTaskShortcutEnabled_setTrue() { createNoteTaskController().setNoteTaskShortcutEnabled(value = true, userTracker.userHandle) Loading @@ -478,6 +480,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { } @Test @Ignore("b/316332684") fun setNoteTaskShortcutEnabled_setFalse() { createNoteTaskController().setNoteTaskShortcutEnabled(value = false, userTracker.userHandle) Loading @@ -494,6 +497,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { } @Test @Ignore("b/316332684") fun setNoteTaskShortcutEnabled_workProfileUser_setTrue() { whenever(context.createContextAsUser(eq(workUserInfo.userHandle), any())) .thenReturn(workProfileContext) Loading @@ -515,6 +519,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { } @Test @Ignore("b/316332684") fun setNoteTaskShortcutEnabled_workProfileUser_setFalse() { whenever(context.createContextAsUser(eq(workUserInfo.userHandle), any())) .thenReturn(workProfileContext) Loading Loading @@ -733,6 +738,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { // region internalUpdateNoteTaskAsUser @Test @Ignore("b/316332684") fun updateNoteTaskAsUserInternal_withNotesRole_withShortcuts_shouldUpdateShortcuts() { createNoteTaskController(isEnabled = true) .launchUpdateNoteTaskAsUser(userTracker.userHandle) Loading Loading @@ -766,6 +772,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { } @Test @Ignore("b/316332684") fun updateNoteTaskAsUserInternal_noNotesRole_shouldDisableShortcuts() { whenever(roleManager.getRoleHoldersAsUser(ROLE_NOTES, userTracker.userHandle)) .thenReturn(emptyList()) Loading @@ -789,6 +796,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { } @Test @Ignore("b/316332684") fun updateNoteTaskAsUserInternal_flagDisabled_shouldDisableShortcuts() { createNoteTaskController(isEnabled = false) .launchUpdateNoteTaskAsUser(userTracker.userHandle) Loading Loading
packages/SystemUI/src/com/android/systemui/notetask/NoteTaskController.kt +4 −0 Original line number Diff line number Diff line Loading @@ -263,7 +263,11 @@ constructor( * If the shortcut entry `android:enabled` is set to `true`, the shortcut will be visible in the * Widget Picker to all users. */ // TODO(b/316332684) @Suppress("UNREACHABLE_CODE") fun setNoteTaskShortcutEnabled(value: Boolean, user: UserHandle) { return // shortcut should not be enabled until additional features are implemented. if (!userManager.isUserUnlocked(user)) { debugLog { "setNoteTaskShortcutEnabled call but user locked: user=$user" } return Loading
packages/SystemUI/tests/src/com/android/systemui/notetask/NoteTaskControllerTest.kt +8 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.UnconfinedTestDispatcher import kotlinx.coroutines.test.runCurrent import org.junit.Before import org.junit.Ignore import org.junit.Test import org.junit.runner.RunWith import org.mockito.ArgumentMatchers.anyInt Loading Loading @@ -462,6 +463,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { // region setNoteTaskShortcutEnabled @Test @Ignore("b/316332684") fun setNoteTaskShortcutEnabled_setTrue() { createNoteTaskController().setNoteTaskShortcutEnabled(value = true, userTracker.userHandle) Loading @@ -478,6 +480,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { } @Test @Ignore("b/316332684") fun setNoteTaskShortcutEnabled_setFalse() { createNoteTaskController().setNoteTaskShortcutEnabled(value = false, userTracker.userHandle) Loading @@ -494,6 +497,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { } @Test @Ignore("b/316332684") fun setNoteTaskShortcutEnabled_workProfileUser_setTrue() { whenever(context.createContextAsUser(eq(workUserInfo.userHandle), any())) .thenReturn(workProfileContext) Loading @@ -515,6 +519,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { } @Test @Ignore("b/316332684") fun setNoteTaskShortcutEnabled_workProfileUser_setFalse() { whenever(context.createContextAsUser(eq(workUserInfo.userHandle), any())) .thenReturn(workProfileContext) Loading Loading @@ -733,6 +738,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { // region internalUpdateNoteTaskAsUser @Test @Ignore("b/316332684") fun updateNoteTaskAsUserInternal_withNotesRole_withShortcuts_shouldUpdateShortcuts() { createNoteTaskController(isEnabled = true) .launchUpdateNoteTaskAsUser(userTracker.userHandle) Loading Loading @@ -766,6 +772,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { } @Test @Ignore("b/316332684") fun updateNoteTaskAsUserInternal_noNotesRole_shouldDisableShortcuts() { whenever(roleManager.getRoleHoldersAsUser(ROLE_NOTES, userTracker.userHandle)) .thenReturn(emptyList()) Loading @@ -789,6 +796,7 @@ internal class NoteTaskControllerTest : SysuiTestCase() { } @Test @Ignore("b/316332684") fun updateNoteTaskAsUserInternal_flagDisabled_shouldDisableShortcuts() { createNoteTaskController(isEnabled = false) .launchUpdateNoteTaskAsUser(userTracker.userHandle) Loading