Commit b6c2ea94 authored by Romain Hunault's avatar Romain Hunault

Merge remote-tracking branch 'origin/cm-14.1' into v1-nougat

parents 1103b331 08693931
......@@ -642,16 +642,18 @@ class GlobalScreenshot {
view.setVisibility(View.GONE);
mWindowManager.removeView(mScreenshotSelectorLayout);
final Rect rect = view.getSelectionRect();
if (rect != null) {
if (rect.width() != 0 && rect.height() != 0) {
// Need mScreenshotSelectorLayout to handle it after the view disappears
mScreenshotSelectorLayout.post(new Runnable() {
public void run() {
takeScreenshot(finisher, statusBarVisible, navBarVisible,
rect.left, rect.top, rect.width(), rect.height());
}
});
}
if (rect != null && rect.width() != 0 && rect.height() != 0) {
// Need mScreenshotSelectorLayout to handle it after the view disappears
mScreenshotSelectorLayout.post(new Runnable() {
public void run() {
takeScreenshot(finisher, statusBarVisible, navBarVisible,
rect.left, rect.top, rect.width(), rect.height());
}
});
} else {
// Clean up if nothing is selected
// to initialize a new screenshot later
finisher.run();
}
view.stopSelection();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment