Merge "Start screenshot timeout even if saving fails" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
abbdec4281
@@ -643,6 +643,18 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
|
|||||||
*/
|
*/
|
||||||
private void showUiOnActionsReady(SavedImageData imageData) {
|
private void showUiOnActionsReady(SavedImageData imageData) {
|
||||||
logSuccessOnActionsReady(imageData);
|
logSuccessOnActionsReady(imageData);
|
||||||
|
|
||||||
|
AccessibilityManager accessibilityManager = (AccessibilityManager)
|
||||||
|
mContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
|
||||||
|
long timeoutMs = accessibilityManager.getRecommendedTimeoutMillis(
|
||||||
|
SCREENSHOT_CORNER_DEFAULT_TIMEOUT_MILLIS,
|
||||||
|
AccessibilityManager.FLAG_CONTENT_CONTROLS);
|
||||||
|
|
||||||
|
mScreenshotHandler.removeMessages(MESSAGE_CORNER_TIMEOUT);
|
||||||
|
mScreenshotHandler.sendMessageDelayed(
|
||||||
|
mScreenshotHandler.obtainMessage(MESSAGE_CORNER_TIMEOUT),
|
||||||
|
timeoutMs);
|
||||||
|
|
||||||
if (imageData.uri != null) {
|
if (imageData.uri != null) {
|
||||||
mScreenshotHandler.post(() -> {
|
mScreenshotHandler.post(() -> {
|
||||||
if (mScreenshotAnimation != null && mScreenshotAnimation.isRunning()) {
|
if (mScreenshotAnimation != null && mScreenshotAnimation.isRunning()) {
|
||||||
@@ -656,17 +668,6 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
|
|||||||
} else {
|
} else {
|
||||||
createScreenshotActionsShadeAnimation(imageData).start();
|
createScreenshotActionsShadeAnimation(imageData).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
AccessibilityManager accessibilityManager = (AccessibilityManager)
|
|
||||||
mContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
|
|
||||||
long timeoutMs = accessibilityManager.getRecommendedTimeoutMillis(
|
|
||||||
SCREENSHOT_CORNER_DEFAULT_TIMEOUT_MILLIS,
|
|
||||||
AccessibilityManager.FLAG_CONTENT_CONTROLS);
|
|
||||||
|
|
||||||
mScreenshotHandler.removeMessages(MESSAGE_CORNER_TIMEOUT);
|
|
||||||
mScreenshotHandler.sendMessageDelayed(
|
|
||||||
mScreenshotHandler.obtainMessage(MESSAGE_CORNER_TIMEOUT),
|
|
||||||
timeoutMs);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user