Merge changes Iffb62170,I9b795928 into tm-qpr-dev
* changes: Clean up leaked screenshot connections Always reset screenshot preview to alpha=1
This commit is contained in:
committed by
Android (Google) Code Review
commit
4658046b52
@@ -377,6 +377,9 @@ public class ScreenshotHelper {
|
||||
msg.replyTo = new Messenger(h);
|
||||
|
||||
if (mScreenshotConnection == null || mScreenshotService == null) {
|
||||
if (mScreenshotConnection != null) {
|
||||
resetConnection();
|
||||
}
|
||||
final ComponentName serviceComponent = ComponentName.unflattenFromString(
|
||||
mContext.getResources().getString(
|
||||
com.android.internal.R.string.config_screenshotServiceComponent));
|
||||
|
||||
@@ -555,6 +555,8 @@ public class ScreenshotController {
|
||||
mScreenshotView.announceForAccessibility(
|
||||
mContext.getResources().getString(R.string.screenshot_saving_title)));
|
||||
|
||||
mScreenshotView.reset();
|
||||
|
||||
if (mScreenshotView.isAttachedToWindow()) {
|
||||
// if we didn't already dismiss for another reason
|
||||
if (!mScreenshotView.isDismissing()) {
|
||||
@@ -564,7 +566,6 @@ public class ScreenshotController {
|
||||
Log.d(TAG, "saveScreenshot: screenshotView is already attached, resetting. "
|
||||
+ "(dismissing=" + mScreenshotView.isDismissing() + ")");
|
||||
}
|
||||
mScreenshotView.reset();
|
||||
}
|
||||
mPackageName = topComponent == null ? "" : topComponent.getPackageName();
|
||||
mScreenshotView.setPackageName(mPackageName);
|
||||
|
||||
@@ -1006,6 +1006,7 @@ public class ScreenshotView extends FrameLayout implements
|
||||
// Clear any references to the bitmap
|
||||
mScreenshotPreview.setImageDrawable(null);
|
||||
mScreenshotPreview.setVisibility(View.INVISIBLE);
|
||||
mScreenshotPreview.setAlpha(1f);
|
||||
mScreenshotPreviewBorder.setAlpha(0);
|
||||
mPendingSharedTransition = false;
|
||||
mActionsContainerBackground.setVisibility(View.GONE);
|
||||
|
||||
Reference in New Issue
Block a user