Fixing crash.
b/28179361 Change-Id: I5c6049efcd0c43f3b0e595648fd331c2a82d4d73
This commit is contained in:
@@ -315,6 +315,15 @@ public class Task {
|
|||||||
return key.id != affiliationTaskId;
|
return key.id != affiliationTaskId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the top activity component.
|
||||||
|
*/
|
||||||
|
public ComponentName getTopComponent() {
|
||||||
|
return topActivity != null
|
||||||
|
? topActivity
|
||||||
|
: key.baseIntent.getComponent();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
// Check that the id matches
|
// Check that the id matches
|
||||||
|
|||||||
@@ -541,7 +541,7 @@ public class RecentsView extends FrameLayout {
|
|||||||
true /* scaleUp */);
|
true /* scaleUp */);
|
||||||
|
|
||||||
MetricsLogger.action(mContext, MetricsEvent.ACTION_WINDOW_DOCK_DRAG_DROP,
|
MetricsLogger.action(mContext, MetricsEvent.ACTION_WINDOW_DOCK_DRAG_DROP,
|
||||||
event.task.topActivity.flattenToShortString());
|
event.task.getTopComponent().flattenToShortString());
|
||||||
} else {
|
} else {
|
||||||
// Animate the overlay alpha back to 0
|
// Animate the overlay alpha back to 0
|
||||||
updateVisibleDockRegions(null, true /* isDefaultDockState */, -1,
|
updateVisibleDockRegions(null, true /* isDefaultDockState */, -1,
|
||||||
|
|||||||
@@ -162,7 +162,8 @@ public class RecentsViewTouchHandler {
|
|||||||
mVisibleDockStates.clear();
|
mVisibleDockStates.clear();
|
||||||
if (ActivityManager.supportsMultiWindow() && !ssp.hasDockedTask()
|
if (ActivityManager.supportsMultiWindow() && !ssp.hasDockedTask()
|
||||||
&& mDividerSnapAlgorithm.isSplitScreenFeasible()) {
|
&& mDividerSnapAlgorithm.isSplitScreenFeasible()) {
|
||||||
Recents.logDockAttempt(mRv.getContext(), event.task.topActivity, event.task.resizeMode);
|
Recents.logDockAttempt(mRv.getContext(), event.task.getTopComponent(),
|
||||||
|
event.task.resizeMode);
|
||||||
if (!event.task.isDockable) {
|
if (!event.task.isDockable) {
|
||||||
EventBus.getDefault().send(new ShowIncompatibleAppOverlayEvent());
|
EventBus.getDefault().send(new ShowIncompatibleAppOverlayEvent());
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user