Respond to CR.

// FREEBIE
pull/1/head
Matthew Chen 9 years ago
parent 9a0a7bb6b1
commit c8e5884087

@ -795,13 +795,13 @@ protocol CallServiceObserver: class {
break break
} }
// We don't need to worry about the user granting or remotinv this permission // We don't need to worry about the user granting or remoting this permission
// during a call while the app is in the background, because changing this // during a call while the app is in the background, because changing this
// permission kills the app. // permission kills the app.
if authStatus != .authorized { if authStatus != .authorized {
DispatchQueue.main.async { DispatchQueue.main.async {
let title = NSLocalizedString("CAMERA_PERMISSION_MISSING_TITLE", comment: "Alert title when camera is not authorized") let title = NSLocalizedString("MISSING_CAMERA_PERMISSION_TITLE", comment: "Alert title when camera is not authorized")
let message = NSLocalizedString("CAMERA_PERMISSION_MISSING_BODY", comment: "Alert body when camera is not authorized") let message = NSLocalizedString("MISSING_CAMERA_PERMISSION_MESSAGE", comment: "Alert body when camera is not authorized")
let okButton = NSLocalizedString("OK", comment:"") let okButton = NSLocalizedString("OK", comment:"")
let alert = UIAlertView(title:title, message:message, delegate:nil, cancelButtonTitle:okButton) let alert = UIAlertView(title:title, message:message, delegate:nil, cancelButtonTitle:okButton)
@ -1155,13 +1155,17 @@ protocol CallServiceObserver: class {
remoteVideoTrack:remoteVideoTrack) remoteVideoTrack:remoteVideoTrack)
} }
} }
}
// Prevent screen from dimming during video call. // Prevent screen from dimming during video call.
//
// fireDidUpdateVideoTracks() is called by the video track setters,
// which are cleared when the call ends. That ensures that this timer
// will be re-enabled.
let hasLocalOrRemoteVideo = localVideoTrack != nil || remoteVideoTrack != nil let hasLocalOrRemoteVideo = localVideoTrack != nil || remoteVideoTrack != nil
UIApplication.shared.isIdleTimerDisabled = hasLocalOrRemoteVideo UIApplication.shared.isIdleTimerDisabled = hasLocalOrRemoteVideo
} }
} }
}
fileprivate extension MessageSender { fileprivate extension MessageSender {
/** /**

@ -76,12 +76,6 @@
/* notification action */ /* notification action */
"CALLBACK_BUTTON_TITLE" = "Call back"; "CALLBACK_BUTTON_TITLE" = "Call back";
/* Alert body when camera is not authorized */
"CAMERA_PERMISSION_MISSING_BODY" = "Signal requires access to your camera for video calls. You can grant this permission in the Settings app >> Privacy >> Camera >> Signal";
/* Alert title when camera is not authorized */
"CAMERA_PERMISSION_MISSING_TITLE" = "Error";
/* Activity Sheet label */ /* Activity Sheet label */
"COMPARE_SAFETY_NUMBER_ACTION" = "Compare with Clipboard"; "COMPARE_SAFETY_NUMBER_ACTION" = "Compare with Clipboard";
@ -455,10 +449,12 @@
notification title */ notification title */
"MISSED_CALL" = "Missed call"; "MISSED_CALL" = "Missed call";
/* Alert body */ /* Alert body
"MISSING_CAMERA_PERMISSION_MESSAGE" = "You previously declined to let Signal access your camera. Update your system settings to proceed."; Alert body when camera is not authorized */
"MISSING_CAMERA_PERMISSION_MESSAGE" = "Signal needs access to your camera for video calls. You can grant this permission in the Settings app >> Privacy >> Camera >> Signal";
/* Alert title */ /* Alert title
Alert title when camera is not authorized */
"MISSING_CAMERA_PERMISSION_TITLE" = "Signal needs to access your camera."; "MISSING_CAMERA_PERMISSION_TITLE" = "Signal needs to access your camera.";
/* notification body /* notification body

Loading…
Cancel
Save