Use activityStarter of KeyguardQuickAffordancePickerViewModel to launch button intent
Before this change, we use application context to launch the enablement action intent, which doesn't have FLAG_ACTIVITY_NEW_TASK. This caused a crash. By launching the enablement action intent using activityStarter, we would avoid the crash and the use of FLAG_ACTIVITY_NEW_TASK because the call site has already used the activity context to start the intent. Test: run KeyguardQuickAffordancePickerViewModelTest in astudio Manual: 1. Go to wallpaper & styles > lock screen > shortcuts 2. Pick a shortcut that is disabled and has a custom action button, e.g. notes app 3. Click the disabled shortcut 4. Click the custom action. 5. The desired activity is launched with no crash. Fix: 279757109 Change-Id: I2f93bdbfb490839d92b694f60c473a61f1c5f63e
Loading
Please register or sign in to comment