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

Commit 9a76afff authored by Michael Jurka's avatar Michael Jurka Committed by Android (Google) Code Review
Browse files

Merge "Make Recent Apps faster" into ics-mr0

parents 8408e516 412cba8a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16,5 +16,5 @@

<alpha xmlns:android="http://schemas.android.com/apk/res/android"
    android:fromAlpha="0.0" android:toAlpha="1.0"
    android:duration="@android:integer/config_mediumAnimTime"
    android:duration="@android:integer/config_shortAnimTime"
    />
+2 −4
Original line number Diff line number Diff line
@@ -39,11 +39,11 @@
            android:layout_marginTop="@dimen/status_bar_recents_thumbnail_top_margin"
            android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin"
            android:background="@drawable/recents_thumbnail_bg"
            android:foreground="@drawable/recents_thumbnail_fg">
            android:foreground="@drawable/recents_thumbnail_fg"
            android:visibility="invisible">
            <ImageView android:id="@+id/app_thumbnail_image"
                android:layout_width="@dimen/status_bar_recents_thumbnail_width"
                android:layout_height="@dimen/status_bar_recents_thumbnail_height"
                android:visibility="invisible"
            />
        </FrameLayout>

@@ -58,7 +58,6 @@
            android:maxHeight="@dimen/status_bar_recents_app_icon_max_height"
            android:scaleType="centerInside"
            android:adjustViewBounds="true"
            android:visibility="invisible"
        />

        <TextView android:id="@+id/app_label"
@@ -74,7 +73,6 @@
            android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin"
            android:singleLine="true"
            android:ellipsize="marquee"
            android:visibility="invisible"
            android:textColor="@color/status_bar_recents_app_label_color"
        />

+2 −2
Original line number Diff line number Diff line
@@ -52,11 +52,11 @@
            android:layout_toRightOf="@id/app_label"
            android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin"
            android:background="@drawable/recents_thumbnail_bg"
            android:foreground="@drawable/recents_thumbnail_fg">
            android:foreground="@drawable/recents_thumbnail_fg"
            android:visibility="invisible">
            <ImageView android:id="@+id/app_thumbnail_image"
                android:layout_width="@dimen/status_bar_recents_thumbnail_width"
                android:layout_height="@dimen/status_bar_recents_thumbnail_height"
                android:visibility="invisible"
            />
        </FrameLayout>
        <View android:id="@+id/recents_callout_line"
+2 −2
Original line number Diff line number Diff line
@@ -31,11 +31,11 @@
        android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin"
        android:scaleType="center"
        android:background="@drawable/recents_thumbnail_bg"
        android:foreground="@drawable/recents_thumbnail_fg">
        android:foreground="@drawable/recents_thumbnail_fg"
        android:visibility="invisible">
        <ImageView android:id="@+id/app_thumbnail_image"
            android:layout_width="@dimen/status_bar_recents_thumbnail_width"
            android:layout_height="@dimen/status_bar_recents_thumbnail_height"
            android:visibility="invisible"
        />
        <ImageView android:id="@+id/app_icon"
            android:layout_width="wrap_content"
+7 −3
Original line number Diff line number Diff line
@@ -86,8 +86,8 @@ public class RecentTasksLoader {
        mIconDpi = isTablet ? DisplayMetrics.DENSITY_HIGH : res.getDisplayMetrics().densityDpi;

        // Render the default thumbnail background
        int width = (int) res.getDimension(R.dimen.status_bar_recents_thumbnail_width);
        int height = (int) res.getDimension(R.dimen.status_bar_recents_thumbnail_height);
        int width = (int) res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_width);
        int height = (int) res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_height);
        int color = res.getColor(R.drawable.status_bar_recents_app_thumbnail_background);

        mDefaultThumbnailBackground = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
@@ -106,6 +106,10 @@ public class RecentTasksLoader {
        mRecentsPanel = recentsPanel;
    }

    public Bitmap getDefaultThumbnail() {
        return mDefaultThumbnailBackground;
    }

    // Create an TaskDescription, returning null if the title or icon is null, or if it's the
    // home activity
    TaskDescription createTaskDescription(int taskId, int persistentTaskId, Intent baseIntent,
@@ -278,7 +282,7 @@ public class RecentTasksLoader {
                            TaskDescription td = descriptions.get(i);
                            loadThumbnail(td);
                            long now = SystemClock.uptimeMillis();
                            nextTime += 150;
                            nextTime += 0;
                            if (nextTime > now) {
                                try {
                                    Thread.sleep(nextTime-now);
Loading