summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Leege <bleege@gmail.com>2015-03-27 19:54:12 -0500
committerBrad Leege <bleege@gmail.com>2015-03-27 19:54:12 -0500
commit2aa7f9ad979f0894bddd9cf56b87420a9d0d9f51 (patch)
tree2b00bf2053fb76ec254295f6396cdd0349707fc5
parent5c6809fc367416268794be0445ae17f23bb2cb8f (diff)
parenta325cb98b5cae0fb145a09f2c739d3161e7f861d (diff)
downloadqtlocation-mapboxgl-2aa7f9ad979f0894bddd9cf56b87420a9d0d9f51.tar.gz
Merge pull request #1150 from mapbox/1134-remove-mail-metric
Removing enabled.mail
-rw-r--r--include/mbgl/ios/MGLMapboxEvents.h1
-rw-r--r--platform/ios/MGLMapView.mm3
-rw-r--r--platform/ios/MGLMapboxEvents.m26
3 files changed, 1 insertions, 29 deletions
diff --git a/include/mbgl/ios/MGLMapboxEvents.h b/include/mbgl/ios/MGLMapboxEvents.h
index 0567eb6764..ea37edbb8e 100644
--- a/include/mbgl/ios/MGLMapboxEvents.h
+++ b/include/mbgl/ios/MGLMapboxEvents.h
@@ -41,7 +41,6 @@ extern NSString *const MGLEventGestureRotateStart;
// You can call these methods from any thread.
//
-+ (BOOL) checkEmailEnabled;
+ (BOOL) checkPushEnabled;
// You can call this method from any thread.
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm
index 200fb02fa7..7c997d615f 100644
--- a/platform/ios/MGLMapView.mm
+++ b/platform/ios/MGLMapView.mm
@@ -359,8 +359,7 @@ mbgl::DefaultFileSource *mbglFileSource = nullptr;
MGLEventKeyLatitude: @(latLng.latitude),
MGLEventKeyLongitude: @(latLng.longitude),
MGLEventKeyZoomLevel: @(zoom),
- MGLEventKeyPushEnabled: @([MGLMapboxEvents checkPushEnabled]),
- MGLEventKeyEmailEnabled: @([MGLMapboxEvents checkEmailEnabled])
+ MGLEventKeyPushEnabled: @([MGLMapboxEvents checkPushEnabled])
}];
return YES;
diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m
index 5478936026..ce59815372 100644
--- a/platform/ios/MGLMapboxEvents.m
+++ b/platform/ios/MGLMapboxEvents.m
@@ -550,32 +550,6 @@ NSString *const MGLEventGestureRotateStart = @"Rotation";
// Can be called from any thread.
//
-+ (BOOL) checkEmailEnabled {
- BOOL (^mailCheckBlock)(void) = ^{
- BOOL blockResult;
- Class MFMailComposeViewController = NSClassFromString(@"MFMailComposeViewController");
- if (MFMailComposeViewController) {
- SEL canSendMail = NSSelectorFromString(@"canSendMail");
- blockResult = ((BOOL (*)(id, SEL))[MFMailComposeViewController methodForSelector:canSendMail])(MFMailComposeViewController, canSendMail);
- }
- return blockResult;
- };
-
- __block BOOL result;
-
- if ( ! [[NSThread currentThread] isMainThread]) {
- dispatch_sync(dispatch_get_main_queue(), ^{
- result = mailCheckBlock();
- });
- } else {
- result = mailCheckBlock();
- }
-
- return result;
-}
-
-// Can be called from any thread.
-//
+ (BOOL) checkPushEnabled {
BOOL (^pushCheckBlock)(void) = ^{
BOOL blockResult;