Return-Path: X-Original-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6FB1A96EF for ; Wed, 13 Jun 2012 21:40:20 +0000 (UTC) Received: (qmail 7689 invoked by uid 500); 13 Jun 2012 21:40:20 -0000 Delivered-To: apmail-incubator-callback-commits-archive@incubator.apache.org Received: (qmail 7659 invoked by uid 500); 13 Jun 2012 21:40:20 -0000 Mailing-List: contact callback-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-commits@incubator.apache.org Received: (qmail 7652 invoked by uid 99); 13 Jun 2012 21:40:20 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jun 2012 21:40:20 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 14B1D11201; Wed, 13 Jun 2012 21:40:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: shazron@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: ios commit: Fixes CB-915 - Pause/resume events get fired twice Message-Id: <20120613214020.14B1D11201@tyr.zones.apache.org> Date: Wed, 13 Jun 2012 21:40:20 +0000 (UTC) Updated Branches: refs/heads/master 0d457d915 -> 49fc7e600 Fixes CB-915 - Pause/resume events get fired twice Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/49fc7e60 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/49fc7e60 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/49fc7e60 Branch: refs/heads/master Commit: 49fc7e60076286e16cb485a0d7f79202efa829a4 Parents: 0d457d9 Author: Shazron Abdullah Authored: Wed Jun 13 14:40:11 2012 -0700 Committer: Shazron Abdullah Committed: Wed Jun 13 14:40:11 2012 -0700 ---------------------------------------------------------------------- CordovaLib/Classes/CDVViewController.m | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/49fc7e60/CordovaLib/Classes/CDVViewController.m ---------------------------------------------------------------------- diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m index afb3bc8..72dfde6 100644 --- a/CordovaLib/Classes/CDVViewController.m +++ b/CordovaLib/Classes/CDVViewController.m @@ -34,6 +34,7 @@ @property (nonatomic, readwrite, retain) IBOutlet UIActivityIndicatorView* activityView; @property (nonatomic, readwrite, retain) UIImageView* imageView; +@property (readwrite, assign) BOOL initialized; @end @@ -44,11 +45,11 @@ @synthesize pluginObjects, pluginsMap, whitelist; @synthesize settings, loadFromString; @synthesize imageView, activityView, useSplashScreen, commandDelegate; -@synthesize wwwFolderName, startPage, invokeString; +@synthesize wwwFolderName, startPage, invokeString, initialized; - (id) __init { - if (self != nil) + if (self != nil && !self.initialized) { [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receivedOrientationChange) @@ -76,6 +77,7 @@ [self printMultitaskingInfo]; [self printDeprecationNotice]; + self.initialized = YES; } return self;