Merge "Defer adding large icon until when we compose the final notification. (Bug 5566846)" into ics-mr1
This commit is contained in:
@ -49,8 +49,6 @@ import android.view.Surface;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.animation.AccelerateInterpolator;
|
|
||||||
import android.view.animation.DecelerateInterpolator;
|
|
||||||
import android.view.animation.Interpolator;
|
import android.view.animation.Interpolator;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
@ -131,8 +129,8 @@ class SaveImageInBackgroundTask extends AsyncTask<SaveImageInBackgroundData, Voi
|
|||||||
// Show the intermediate notification
|
// Show the intermediate notification
|
||||||
mTickerAddSpace = !mTickerAddSpace;
|
mTickerAddSpace = !mTickerAddSpace;
|
||||||
mNotificationId = nId;
|
mNotificationId = nId;
|
||||||
|
mNotificationManager = nManager;
|
||||||
mNotificationBuilder = new Notification.Builder(context)
|
mNotificationBuilder = new Notification.Builder(context)
|
||||||
.setLargeIcon(croppedIcon)
|
|
||||||
.setTicker(r.getString(R.string.screenshot_saving_ticker)
|
.setTicker(r.getString(R.string.screenshot_saving_ticker)
|
||||||
+ (mTickerAddSpace ? " " : ""))
|
+ (mTickerAddSpace ? " " : ""))
|
||||||
.setContentTitle(r.getString(R.string.screenshot_saving_title))
|
.setContentTitle(r.getString(R.string.screenshot_saving_title))
|
||||||
@ -141,9 +139,12 @@ class SaveImageInBackgroundTask extends AsyncTask<SaveImageInBackgroundData, Voi
|
|||||||
.setWhen(System.currentTimeMillis());
|
.setWhen(System.currentTimeMillis());
|
||||||
Notification n = mNotificationBuilder.getNotification();
|
Notification n = mNotificationBuilder.getNotification();
|
||||||
n.flags |= Notification.FLAG_NO_CLEAR;
|
n.flags |= Notification.FLAG_NO_CLEAR;
|
||||||
|
|
||||||
mNotificationManager = nManager;
|
|
||||||
mNotificationManager.notify(nId, n);
|
mNotificationManager.notify(nId, n);
|
||||||
|
|
||||||
|
// On the tablet, the large icon makes the notification appear as if it is clickable (and
|
||||||
|
// on small devices, the large icon is not shown) so defer showing the large icon until
|
||||||
|
// we compose the final post-save notification below.
|
||||||
|
mNotificationBuilder.setLargeIcon(croppedIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user