clang_format_code'd files previously parsed wrong

pull/19703/head^2
Tony Lu 5 years ago
parent 825ce5cef3
commit b2e8417400
  1. 28
      src/objective-c/examples/watchOS-sample/watchOS-sample-WatchKit-Extension/ExtensionDelegate.m
  2. 2
      src/objective-c/examples/watchOS-sample/watchOS-sample-WatchKit-Extension/InterfaceController.h
  3. 11
      src/objective-c/examples/watchOS-sample/watchOS-sample-WatchKit-Extension/InterfaceController.m

@ -25,29 +25,37 @@
}
- (void)applicationDidBecomeActive {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
// Restart any tasks that were paused (or not yet started) while the application was inactive. If
// the application was previously in the background, optionally refresh the user interface.
}
- (void)applicationWillResignActive {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, etc.
// Sent when the application is about to move from active to inactive state. This can occur for
// certain types of temporary interruptions (such as an incoming phone call or SMS message) or
// when the user quits the application and it begins the transition to the background state. Use
// this method to pause ongoing tasks, disable timers, etc.
}
- (void)handleBackgroundTasks:(NSSet<WKRefreshBackgroundTask *> *)backgroundTasks {
// Sent when the system needs to launch the application in the background to process tasks. Tasks arrive in a set, so loop through and process each one.
// Sent when the system needs to launch the application in the background to process tasks. Tasks
// arrive in a set, so loop through and process each one.
for (WKRefreshBackgroundTask *task in backgroundTasks) {
// Check the Class of each task to decide how to process it
if ([task isKindOfClass:[WKApplicationRefreshBackgroundTask class]]) {
// Be sure to complete the background task once youre done.
WKApplicationRefreshBackgroundTask *backgroundTask = (WKApplicationRefreshBackgroundTask*)task;
WKApplicationRefreshBackgroundTask *backgroundTask =
(WKApplicationRefreshBackgroundTask *)task;
[backgroundTask setTaskCompletedWithSnapshot:NO];
} else if ([task isKindOfClass:[WKSnapshotRefreshBackgroundTask class]]) {
// Snapshot tasks have a unique completion call, make sure to set your expiration date
WKSnapshotRefreshBackgroundTask *snapshotTask = (WKSnapshotRefreshBackgroundTask *)task;
[snapshotTask setTaskCompletedWithDefaultStateRestored:YES estimatedSnapshotExpiration:[NSDate distantFuture] userInfo:nil];
[snapshotTask setTaskCompletedWithDefaultStateRestored:YES
estimatedSnapshotExpiration:[NSDate distantFuture]
userInfo:nil];
} else if ([task isKindOfClass:[WKWatchConnectivityRefreshBackgroundTask class]]) {
// Be sure to complete the background task once youre done.
WKWatchConnectivityRefreshBackgroundTask *backgroundTask = (WKWatchConnectivityRefreshBackgroundTask*)task;
WKWatchConnectivityRefreshBackgroundTask *backgroundTask =
(WKWatchConnectivityRefreshBackgroundTask *)task;
[backgroundTask setTaskCompletedWithSnapshot:NO];
} else if ([task isKindOfClass:[WKURLSessionRefreshBackgroundTask class]]) {
// Be sure to complete the background task once youre done.
@ -55,11 +63,13 @@
[backgroundTask setTaskCompletedWithSnapshot:NO];
} else if ([task isKindOfClass:[WKRelevantShortcutRefreshBackgroundTask class]]) {
// Be sure to complete the relevant-shortcut task once youre done.
WKRelevantShortcutRefreshBackgroundTask *relevantShortcutTask = (WKRelevantShortcutRefreshBackgroundTask*)task;
WKRelevantShortcutRefreshBackgroundTask *relevantShortcutTask =
(WKRelevantShortcutRefreshBackgroundTask *)task;
[relevantShortcutTask setTaskCompletedWithSnapshot:NO];
} else if ([task isKindOfClass:[WKIntentDidRunRefreshBackgroundTask class]]) {
// Be sure to complete the intent-did-run task once youre done.
WKIntentDidRunRefreshBackgroundTask *intentDidRunTask = (WKIntentDidRunRefreshBackgroundTask*)task;
WKIntentDidRunRefreshBackgroundTask *intentDidRunTask =
(WKIntentDidRunRefreshBackgroundTask *)task;
[intentDidRunTask setTaskCompletedWithSnapshot:NO];
} else {
// make sure to complete unhandled task types

@ -16,8 +16,8 @@
*
*/
#import <WatchKit/WatchKit.h>
#import <Foundation/Foundation.h>
#import <WatchKit/WatchKit.h>
@interface InterfaceController : WKInterfaceController

@ -24,7 +24,6 @@
@end
@implementation InterfaceController {
GRPCCallOptions *_options;
RMTTestService *_service;
@ -35,7 +34,6 @@
// Configure interface objects here.
GRPCMutableCallOptions *options = [[GRPCMutableCallOptions alloc] init];
_options = options;
@ -54,12 +52,10 @@
}
- (IBAction)makeCall {
RMTSimpleRequest *request = [RMTSimpleRequest message];
request.responseSize = 100;
GRPCUnaryProtoCall *call = [_service unaryCallWithMessage:request
responseHandler:self
callOptions:nil];
GRPCUnaryProtoCall *call =
[_service unaryCallWithMessage:request responseHandler:self callOptions:nil];
[call start];
}
@ -72,6 +68,3 @@
}
@end

Loading…
Cancel
Save