Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 23746d51 authored by Winson's avatar Winson Committed by Winson Chung
Browse files

Fixing landscape transition into Recents.

- Fixing jump in transition when going into Recents in landscape
- Also adding check to prevent NPE when searching for a null task.

Change-Id: I3944ea54caaab41a069a9e8255601ec2871afe56
parent 389a3069
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -115,8 +115,8 @@ public class RecentsConfiguration {
        // Recompute some values based on the given state, since we can not rely on the resource
        // system to get certain values.
        boolean isLandscape = windowRect.width() > windowRect.height();
        hasTransposedNavBar = isLandscape && isLargeScreen && !isXLargeScreen;
        hasTransposedSearchBar = isLandscape && isLargeScreen && !isXLargeScreen;
        hasTransposedNavBar = isLandscape && !isXLargeScreen;
        hasTransposedSearchBar = isLandscape && !isXLargeScreen;
    }

    /**
+1 −1
Original line number Diff line number Diff line
@@ -137,7 +137,7 @@ class FilteredTaskList {

    /** Returns the index of this task in the list of filtered tasks */
    int indexOf(Task t) {
        if (mTaskIndices.containsKey(t.key)) {
        if (t != null && mTaskIndices.containsKey(t.key)) {
            return mTaskIndices.get(t.key);
        }
        return -1;