Skip to content

Commit 9c99aee

Browse files
author
Winson Chung
committed
Defer adding large icon until when we compose the final notification. (Bug 5566846)
Change-Id: I9f156d7b597112ce14e274f05df421100c9481e6
1 parent 424781e commit 9c99aee

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@
4949
import android.view.View;
5050
import android.view.ViewGroup;
5151
import android.view.WindowManager;
52-
import android.view.animation.AccelerateInterpolator;
53-
import android.view.animation.DecelerateInterpolator;
5452
import android.view.animation.Interpolator;
5553
import android.widget.FrameLayout;
5654
import android.widget.ImageView;
@@ -131,8 +129,8 @@ class SaveImageInBackgroundTask extends AsyncTask<SaveImageInBackgroundData, Voi
131129
// Show the intermediate notification
132130
mTickerAddSpace = !mTickerAddSpace;
133131
mNotificationId = nId;
132+
mNotificationManager = nManager;
134133
mNotificationBuilder = new Notification.Builder(context)
135-
.setLargeIcon(croppedIcon)
136134
.setTicker(r.getString(R.string.screenshot_saving_ticker)
137135
+ (mTickerAddSpace ? " " : ""))
138136
.setContentTitle(r.getString(R.string.screenshot_saving_title))
@@ -141,9 +139,12 @@ class SaveImageInBackgroundTask extends AsyncTask<SaveImageInBackgroundData, Voi
141139
.setWhen(System.currentTimeMillis());
142140
Notification n = mNotificationBuilder.getNotification();
143141
n.flags |= Notification.FLAG_NO_CLEAR;
144-
145-
mNotificationManager = nManager;
146142
mNotificationManager.notify(nId, n);
143+
144+
// On the tablet, the large icon makes the notification appear as if it is clickable (and
145+
// on small devices, the large icon is not shown) so defer showing the large icon until
146+
// we compose the final post-save notification below.
147+
mNotificationBuilder.setLargeIcon(croppedIcon);
147148
}
148149

149150
@Override

0 commit comments

Comments
 (0)