Fix NPE when consuming snapshots for recent animation
Fix: 207716265 Test: no exception throws after recent animation Change-Id: Ic35aea2285fb120f7d0b5215137ad9450518702f
This commit is contained in:
parent
d873788275
commit
7f8e57ed68
|
@ -20,6 +20,7 @@ import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_HOME;
|
|||
import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_OVERVIEW;
|
||||
import static com.android.quickstep.MultiStateCallback.DEBUG_STATES;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.ActivityManager;
|
||||
import android.content.Intent;
|
||||
|
@ -397,12 +398,16 @@ public class GestureState implements RecentsAnimationCallbacks.RecentsAnimationL
|
|||
* while STATE_RECENTS_ANIMATION_CANCELED state is being set, and the caller is responsible for
|
||||
* calling {@link RecentsAnimationController#cleanupScreenshot()}.
|
||||
*/
|
||||
@Nullable
|
||||
HashMap<Integer, ThumbnailData> consumeRecentsAnimationCanceledSnapshot() {
|
||||
if (mRecentsAnimationCanceledSnapshots != null) {
|
||||
HashMap<Integer, ThumbnailData> data =
|
||||
new HashMap<Integer, ThumbnailData>(mRecentsAnimationCanceledSnapshots);
|
||||
mRecentsAnimationCanceledSnapshots = null;
|
||||
return data;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
void setSwipeUpStartTimeMs(long uptimeMs) {
|
||||
mSwipeUpStartTimeMs = uptimeMs;
|
||||
|
|
Loading…
Reference in New Issue