Fixing crash when trying to set thumbnail info.
- The TaskThumbnailInfo can have the same lifecycle as the TaskRecord, and we should just reset it instead of setting it to null when the thumbnail is disposed. Bug: 25652261 Change-Id: I54384e208b19e60d469bf3471dd555f78f04290c
This commit is contained in:
@@ -1558,6 +1558,16 @@ public class ActivityManager {
|
||||
readFromParcel(source);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets this info state to the initial state.
|
||||
* @hide
|
||||
*/
|
||||
public void reset() {
|
||||
taskWidth = 0;
|
||||
taskHeight = 0;
|
||||
screenOrientation = 0;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public void saveToXml(XmlSerializer out) throws IOException {
|
||||
out.attribute(null, ATTR_TASK_WIDTH, Integer.toString(taskWidth));
|
||||
|
||||
@@ -572,8 +572,8 @@ final class TaskRecord {
|
||||
* Removes all associated thumbnail data when a task is removed or pruned from recents.
|
||||
*/
|
||||
void disposeThumbnail() {
|
||||
mLastThumbnailInfo.reset();
|
||||
mLastThumbnail = null;
|
||||
mLastThumbnailInfo = null;
|
||||
lastDescription = null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user