mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Add null check for mRemoteTargetHandles for side task launch
* Other checks haven't changed, only pulled them out into separate block Fixes: 215699962 Test: Unable to repro the crash, I tried ending the activity and starting via adb shell, but I was never able to get into the original if-block that triggered the NPE Change-Id: I83320634f1d059de610176f9031682ca287bd589
This commit is contained in:
@@ -984,13 +984,17 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
*/
|
||||
public void launchSideTaskInLiveTileModeForRestartedApp(int taskId) {
|
||||
int runningTaskViewId = getTaskViewIdFromTaskId(taskId);
|
||||
if (mRunningTaskViewId != -1 && mRunningTaskViewId == runningTaskViewId) {
|
||||
TransformParams params = mRemoteTargetHandles[0].getTransformParams();
|
||||
RemoteAnimationTargets targets = params.getTargetSet();
|
||||
if (targets != null && targets.findTask(taskId) != null) {
|
||||
launchSideTaskInLiveTileMode(taskId, targets.apps, targets.wallpapers,
|
||||
targets.nonApps);
|
||||
}
|
||||
if (mRunningTaskViewId == -1 ||
|
||||
mRunningTaskViewId != runningTaskViewId ||
|
||||
mRemoteTargetHandles == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
TransformParams params = mRemoteTargetHandles[0].getTransformParams();
|
||||
RemoteAnimationTargets targets = params.getTargetSet();
|
||||
if (targets != null && targets.findTask(taskId) != null) {
|
||||
launchSideTaskInLiveTileMode(taskId, targets.apps, targets.wallpapers,
|
||||
targets.nonApps);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user