Respond to CR.

// FREEBIE
pull/1/head
Matthew Chen 7 years ago
parent 183f0f1ccd
commit 8a4d67a6e4

@ -27,9 +27,6 @@ extern NSString *const OWSPreferencesKeyEnableDebugLog;
#pragma mark - Specific Preferences
- (NSTimeInterval)getCachedOrDefaultDesiredBufferDepth;
- (void)setCachedDesiredBufferDepth:(double)value;
- (BOOL)getHasSentAMessage;
- (void)setHasSentAMessage:(BOOL)enabled;
@ -49,9 +46,6 @@ extern NSString *const OWSPreferencesKeyEnableDebugLog;
- (BOOL)soundInForeground;
- (void)setSoundInForeground:(BOOL)enabled;
- (BOOL)hasRegisteredVOIPPush;
- (void)setHasRegisteredVOIPPush:(BOOL)enabled;
- (BOOL)hasDeclinedNoContactsView;
- (void)setHasDeclinedNoContactsView:(BOOL)value;

@ -7,17 +7,14 @@
NS_ASSUME_NONNULL_BEGIN
double const OWSPreferencesDefaultCallStreamDESBufferLevel = 0.5;
NSString *const OWSPreferencesSignalDatabaseCollection = @"SignalPreferences";
NSString *const OWSPreferencesKeyCallStreamDESBufferLevel = @"CallStreamDesiredBufferLevel";
NSString *const OWSPreferencesKeyScreenSecurity = @"Screen Security Key";
NSString *const OWSPreferencesKeyEnableDebugLog = @"Debugging Log Enabled Key";
NSString *const OWSPreferencesKeyNotificationPreviewType = @"Notification Preview Type Key";
NSString *const OWSPreferencesKeyHasSentAMessage = @"User has sent a message";
NSString *const OWSPreferencesKeyHasArchivedAMessage = @"User archived a message";
NSString *const OWSPreferencesKeyPlaySoundInForeground = @"NotificationSoundInForeground";
NSString *const OWSPreferencesKeyHasRegisteredVoipPush = @"VOIPPushEnabled";
NSString *const OWSPreferencesKeyLastRecordedPushToken = @"LastRecordedPushToken";
NSString *const OWSPreferencesKeyLastRecordedVoipToken = @"LastRecordedVoipToken";
NSString *const OWSPreferencesKeyCallKitEnabled = @"CallKitEnabled";
@ -65,26 +62,17 @@ NSString *const OWSPreferencesKeyAreReadReceiptsEnabled = @"areReadReceiptsEnabl
#pragma mark - Specific Preferences
- (NSTimeInterval)getCachedOrDefaultDesiredBufferDepth
{
id v = [self tryGetValueForKey:OWSPreferencesKeyCallStreamDESBufferLevel];
if (v == nil)
return OWSPreferencesDefaultCallStreamDESBufferLevel;
return [v doubleValue];
}
- (void)setCachedDesiredBufferDepth:(double)value
{
ows_require(value >= 0);
[self setValueForKey:OWSPreferencesKeyCallStreamDESBufferLevel toValue:@(value)];
}
- (BOOL)screenSecurityIsEnabled
{
NSNumber *preference = [self tryGetValueForKey:OWSPreferencesKeyScreenSecurity];
return preference ? [preference boolValue] : YES;
}
- (void)setScreenSecurity:(BOOL)flag
{
[self setValueForKey:OWSPreferencesKeyScreenSecurity toValue:@(flag)];
}
- (BOOL)getHasSentAMessage
{
NSNumber *preference = [self tryGetValueForKey:OWSPreferencesKeyHasSentAMessage];
@ -105,26 +93,6 @@ NSString *const OWSPreferencesKeyAreReadReceiptsEnabled = @"areReadReceiptsEnabl
}
}
- (BOOL)hasRegisteredVOIPPush
{
NSNumber *preference = [self tryGetValueForKey:OWSPreferencesKeyHasRegisteredVoipPush];
if (preference) {
return [preference boolValue];
} else {
return YES;
}
}
- (void)setScreenSecurity:(BOOL)flag
{
[self setValueForKey:OWSPreferencesKeyScreenSecurity toValue:@(flag)];
}
- (void)setHasRegisteredVOIPPush:(BOOL)enabled
{
[self setValueForKey:OWSPreferencesKeyHasRegisteredVoipPush toValue:@(enabled)];
}
+ (BOOL)loggingIsEnabled
{
NSNumber *preference = [NSUserDefaults.standardUserDefaults objectForKey:OWSPreferencesKeyEnableDebugLog];

@ -267,7 +267,6 @@ NSString *const Signal_Message_MarkAsRead_Identifier = @"Signal_Message_MarkAsRe
} else {
TOCFutureSource *futureSource = [TOCFutureSource new];
[futureSource trySetResult:nil];
[Environment.preferences setHasRegisteredVOIPPush:FALSE];
return futureSource.future;
}
}

@ -3,7 +3,6 @@
//
#import <AddressBook/AddressBook.h>
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN

@ -2,8 +2,6 @@
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import <Foundation/Foundation.h>
#define COUNTRY_CODE_PREFIX @"+"
/**

@ -2,7 +2,6 @@
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "NBPhoneNumberUtil.h"
#import "PhoneNumber.h"

@ -1,12 +1,6 @@
//
// SecurityUtils.h
// TextSecureKit
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
// Created by Frederic Jacobs on 28/10/14.
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface SecurityUtils : NSObject

@ -1,4 +1,6 @@
#import <Foundation/Foundation.h>
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
@interface NSArray (FunctionalUtil)

@ -1,4 +1,6 @@
#import <Foundation/Foundation.h>
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
@interface NSData (Base64)

@ -2,8 +2,6 @@
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSData (Image)
+ (BOOL)ows_isValidImageAtPath:(NSString *)filePath;

@ -1,12 +1,6 @@
//
// NSData+hexString.h
// TextSecureKit
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
// Created by Frederic Jacobs on 28/10/14.
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSData (hexString)

@ -1,12 +1,6 @@
//
// NSData+messagePadding.h
// TextSecureKit
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
// Created by Frederic Jacobs on 15/11/14.
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSData (messagePadding)

@ -1,12 +1,6 @@
//
// NSURLSessionDataTask+StatusCode.h
// TextSecureKit
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
// Created by Frederic Jacobs on 04/11/14.
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSURLSessionTask (StatusCode)

@ -1,4 +1,6 @@
#import <Foundation/Foundation.h>
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
@interface BadArgument : NSException
+(BadArgument*) new:(NSString*)reason;

@ -1,4 +1,6 @@
#import <Foundation/Foundation.h>
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
@interface BadState : NSException
+(void)raise:(NSString *)message;

@ -1,4 +1,6 @@
#import <Foundation/Foundation.h>
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
@interface OperationFailed : NSException
+(OperationFailed*) new:(NSString*)reason;

@ -1,4 +1,7 @@
#import <Foundation/Foundation.h>
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import "OperationFailed.h"
@interface SecurityFailure : OperationFailed

@ -2,7 +2,6 @@
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import <Foundation/Foundation.h>
#include <Availability.h>
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(major, minor) \

Loading…
Cancel
Save