You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2016/12/13 23:48:29 UTC

[01/16] cordova-plugin-screen-orientation git commit: One js file for ios, android and windows

Repository: cordova-plugin-screen-orientation
Updated Branches:
  refs/heads/master 4432918c8 -> fe3beaeda


 One js file for ios, android and windows


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/2d8500f6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/2d8500f6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/2d8500f6

Branch: refs/heads/master
Commit: 2d8500f6a59f378473c846a86bc07935e8215ce1
Parents: 4b7a573
Author: maverickmishra <vi...@gmail.com>
Authored: Mon Aug 29 14:33:03 2016 -0700
Committer: maverickmishra <vi...@gmail.com>
Committed: Mon Aug 29 14:33:03 2016 -0700

----------------------------------------------------------------------
 .DS_Store                                       | Bin 0 -> 6148 bytes
 plugin.xml                                      |  91 +++++------
 src/.DS_Store                                   | Bin 0 -> 8196 bytes
 src/android/.DS_Store                           | Bin 0 -> 6148 bytes
 src/android/CDVOrientation.java                 |  98 ++++++++++++
 src/android/YoikScreenOrientation.java          | 101 -------------
 src/ios/.DS_Store                               | Bin 0 -> 6148 bytes
 src/ios/CDVOrientation.h                        |  31 ++++
 src/ios/CDVOrientation.m                        |  65 ++++++++
 ...ViewController+UpdateSupportedOrientations.h |  28 ----
 ...ViewController+UpdateSupportedOrientations.m |  32 ----
 src/ios/YoikScreenOrientation.h                 |  36 -----
 src/ios/YoikScreenOrientation.m                 | 120 ---------------
 src/windows/.DS_Store                           | Bin 0 -> 6148 bytes
 src/windows/CDVOrientation.cs                   |  58 ++++++++
 src/wp/YoikScreenOrientation.cs                 | 140 -----------------
 www/.DS_Store                                   | Bin 0 -> 6148 bytes
 www/screenorientation.android.js                |  29 ----
 www/screenorientation.ios.js                    |  56 -------
 www/screenorientation.js                        | 149 +++++++++++--------
 www/screenorientation.windows.js                |  54 -------
 www/screenorientation.wp8.js                    |  29 ----
 22 files changed, 376 insertions(+), 741 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/.DS_Store
----------------------------------------------------------------------
diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..76433a1
Binary files /dev/null and b/.DS_Store differ

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 3f280f7..205a6a5 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -1,65 +1,60 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-    http://www.apache.org/licenses/LICENSE-2.0
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
 
 <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
     id="cordova-plugin-screen-orientation"
     version="1.4.2">
-
+    
     <name>Screen Orientation</name>
     <description>Adds Screen Orientation API lock and unlock functions to the global screen object in android, iOS, WP8, W8.1, and BB10.</description>
     <license>MIT</license>
-
+    
     <engines>
         <engine name="cordova" version=">=3.0.0" />
     </engines>
-
+    
     <js-module src="www/screenorientation.js" name="screenorientation">
         <clobbers target="cordova.plugins.screenorientation" />
     </js-module>
-
+    
     <platform name="ios">
         <config-file target="config.xml" parent="/*">
-            <feature name="YoikScreenOrientation">
-                <param name="ios-package" value="YoikScreenOrientation" />
+            <feature name="CDVOrientation">
+                <param name="ios-package" value="CDVOrientation" />
             </feature>
         </config-file>
-        <js-module src="www/screenorientation.ios.js" name="screenorientation.ios">
-            <merges target="cordova.plugins.screenorientation" />
-        </js-module>
-        <header-file src="src/ios/YoikScreenOrientation.h" />
-        <source-file src="src/ios/YoikScreenOrientation.m" />
-        <header-file src="src/ios/CDVViewController+UpdateSupportedOrientations.h" />
-        <source-file src="src/ios/CDVViewController+UpdateSupportedOrientations.m" />
+        
+        <header-file src="src/ios/CDVOrientation.h" />
+        <source-file src="src/ios/CDVOrientation.m" />
+        
     </platform>
-
+    
     <platform name="android">
-        <source-file src="src/android/YoikScreenOrientation.java" target-dir="src/net/yoik/cordova/plugins/screenorientation/" />
-
+        <source-file src="src/android/CDVOrientation.java" target-dir="src/cordova/plugins/screenorientation/" />
+        
         <config-file target="res/xml/config.xml" parent="/*">
-            <feature name="YoikScreenOrientation">
-                <param name="android-package" value="net.yoik.cordova.plugins.screenorientation.YoikScreenOrientation" />
+            <feature name="CDVOrientation">
+                <param name="android-package" value="cordova.plugins.screenorientation.CDVOrientation" />
             </feature>
         </config-file>
-        <js-module src="www/screenorientation.android.js" name="screenorientation.android">
-            <merges target="cordova.plugins.screenorientation" />
-        </js-module>
+        
     </platform>
-
+    
     <platform name="blackberry10">
         <dependency id="com.blackberry.app" />
         <config-file target="www/config.xml" parent="/widget">
@@ -69,23 +64,13 @@
             <merges target="cordova.plugins.screenorientation" />
         </js-module>
     </platform>
-
-    <platform name="wp8">
-        <config-file target="config.xml" parent="/*">
-            <feature name="YoikScreenOrientation">
-                <param name="wp-package" value="YoikScreenOrientation"/>
-            </feature>
-        </config-file>
-        <js-module src="www/screenorientation.wp8.js" name="screenorientation.wp8">
-            <merges target="cordova.plugins.screenorientation" />
-        </js-module>
-        <source-file src="src/wp/YoikScreenOrientation.cs" />
-    </platform>
-
+    
+    
+    
     <platform name="windows">
-        <js-module src="www/screenorientation.windows.js" name="screenorientation.windows">
-            <merges target="cordova.plugins.screenorientation" />
+        <js-module src="src/windows/CDVOrientationProxy.js" name="CDVOrientationProxy">
+            <merges target="" />
         </js-module>
     </platform>
-
+    
 </plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/src/.DS_Store
----------------------------------------------------------------------
diff --git a/src/.DS_Store b/src/.DS_Store
new file mode 100644
index 0000000..1c7cb28
Binary files /dev/null and b/src/.DS_Store differ

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/src/android/.DS_Store
----------------------------------------------------------------------
diff --git a/src/android/.DS_Store b/src/android/.DS_Store
new file mode 100644
index 0000000..351e7f3
Binary files /dev/null and b/src/android/.DS_Store differ

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/src/android/CDVOrientation.java
----------------------------------------------------------------------
diff --git a/src/android/CDVOrientation.java b/src/android/CDVOrientation.java
new file mode 100644
index 0000000..3def795
--- /dev/null
+++ b/src/android/CDVOrientation.java
@@ -0,0 +1,98 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package cordova.plugins.screenorientation;
+
+import org.apache.cordova.CallbackContext;
+import org.apache.cordova.CordovaPlugin;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+
+import android.app.Activity;
+import android.content.pm.ActivityInfo;
+import android.util.Log;
+
+public class CDVOrientation extends CordovaPlugin {
+    
+    private static final String TAG = "YoikScreenOrientation";
+    
+    /**
+     * Screen Orientation Constants
+     */
+    
+    private static final String UNLOCKED = "unlocked";
+    private static final String PORTRAIT_PRIMARY = "portrait-primary";
+    private static final String PORTRAIT_SECONDARY = "portrait-secondary";
+    private static final String LANDSCAPE_PRIMARY = "landscape-primary";
+    private static final String LANDSCAPE_SECONDARY = "landscape-secondary";
+    private static final String PORTRAIT = "portrait";
+    private static final String LANDSCAPE = "landscape";
+    
+    @Override
+    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) {
+        
+        Log.d(TAG, "execute action: " + action);
+        
+        // Route the Action
+        if (action.equals("screenOrientation")) {
+            return routeScreenOrientation(args, callbackContext);
+        }
+        
+        // Action not found
+        callbackContext.error("action not recognised");
+        return false;
+    }
+    
+    private boolean routeScreenOrientation(JSONArray args, CallbackContext callbackContext) {
+        
+        String action = args.optString(0);
+        
+        
+        
+        String orientation = args.optString(1);
+        
+        Log.d(TAG, "Requested ScreenOrientation: " + orientation);
+        
+        Activity activity = cordova.getActivity();
+        
+        if (orientation.equals(UNLOCKED)) {
+            activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
+        } else if (orientation.equals(LANDSCAPE_PRIMARY)) {
+            activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
+        } else if (orientation.equals(PORTRAIT_PRIMARY)) {
+            activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+        } else if (orientation.equals(LANDSCAPE)) {
+            activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
+        } else if (orientation.equals(PORTRAIT)) {
+            activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
+        } else if (orientation.equals(LANDSCAPE_SECONDARY)) {
+            activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE);
+        } else if (orientation.equals(PORTRAIT_SECONDARY)) {
+            activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT);
+        }
+        
+        callbackContext.success();
+        return true;
+        
+        
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/src/android/YoikScreenOrientation.java
----------------------------------------------------------------------
diff --git a/src/android/YoikScreenOrientation.java b/src/android/YoikScreenOrientation.java
deleted file mode 100644
index 41674cf..0000000
--- a/src/android/YoikScreenOrientation.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package net.yoik.cordova.plugins.screenorientation;
-
-import org.apache.cordova.CallbackContext;
-import org.apache.cordova.CordovaPlugin;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-
-import android.app.Activity;
-import android.content.pm.ActivityInfo;
-import android.util.Log;
-
-public class YoikScreenOrientation extends CordovaPlugin {
-
-    private static final String TAG = "YoikScreenOrientation";
-
-    /**
-     * Screen Orientation Constants
-     */
-
-    private static final String UNLOCKED = "unlocked";
-    private static final String PORTRAIT_PRIMARY = "portrait-primary";
-    private static final String PORTRAIT_SECONDARY = "portrait-secondary";
-    private static final String LANDSCAPE_PRIMARY = "landscape-primary";
-    private static final String LANDSCAPE_SECONDARY = "landscape-secondary";
-    private static final String PORTRAIT = "portrait";
-    private static final String LANDSCAPE = "landscape";
-
-    @Override
-    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) {
-
-        Log.d(TAG, "execute action: " + action);
-
-        // Route the Action
-        if (action.equals("screenOrientation")) {
-            return routeScreenOrientation(args, callbackContext);
-        }
-
-        // Action not found
-        callbackContext.error("action not recognised");
-        return false;
-    }
-
-    private boolean routeScreenOrientation(JSONArray args, CallbackContext callbackContext) {
-
-        String action = args.optString(0);
-
-        if (action.equals("set")) {
-
-            String orientation = args.optString(1);
-
-            Log.d(TAG, "Requested ScreenOrientation: " + orientation);
-
-            Activity activity = cordova.getActivity();
-
-            if (orientation.equals(UNLOCKED)) {
-                activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
-            } else if (orientation.equals(LANDSCAPE_PRIMARY)) {
-                activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
-            } else if (orientation.equals(PORTRAIT_PRIMARY)) {
-                activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
-            } else if (orientation.equals(LANDSCAPE)) {
-                activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
-            } else if (orientation.equals(PORTRAIT)) {
-                activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
-            } else if (orientation.equals(LANDSCAPE_SECONDARY)) {
-                activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE);
-            } else if (orientation.equals(PORTRAIT_SECONDARY)) {
-                activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT);
-            }
-
-            callbackContext.success();
-            return true;
-
-        } else {
-            callbackContext.error("ScreenOrientation not recognised");
-            return false;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/src/ios/.DS_Store
----------------------------------------------------------------------
diff --git a/src/ios/.DS_Store b/src/ios/.DS_Store
new file mode 100644
index 0000000..810f0b6
Binary files /dev/null and b/src/ios/.DS_Store differ

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/src/ios/CDVOrientation.h
----------------------------------------------------------------------
diff --git a/src/ios/CDVOrientation.h b/src/ios/CDVOrientation.h
new file mode 100644
index 0000000..48166a3
--- /dev/null
+++ b/src/ios/CDVOrientation.h
@@ -0,0 +1,31 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+#import <Cordova/CDVPlugin.h>
+#import <UIKit/UIKit.h>
+#import <Cordova/CDVViewController.h>
+
+@interface CDVOrientation : CDVPlugin
+{}
+
+- (void)screenOrientation:(CDVInvokedUrlCommand *)command;
+
+@end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/src/ios/CDVOrientation.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVOrientation.m b/src/ios/CDVOrientation.m
new file mode 100644
index 0000000..b38a55d
--- /dev/null
+++ b/src/ios/CDVOrientation.m
@@ -0,0 +1,65 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+#import "CDVOrientation.h"
+#import <Cordova/CDVViewController.h>
+#import <objc/message.h>
+
+@interface CDVOrientation () {}
+@end
+
+@implementation CDVOrientation
+
+-(void)screenOrientation:(CDVInvokedUrlCommand *)command
+{
+    CDVPluginResult* pluginResult;
+    NSInteger orientationMask = [[command argumentAtIndex:0] integerValue];
+    CDVViewController* vc = (CDVViewController*)self.viewController;
+    NSMutableArray* result = [[NSMutableArray alloc] init];
+    
+    if(orientationMask & 1) {
+        [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationPortrait]];
+    }
+    if(orientationMask & 2) {
+        [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationPortraitUpsideDown]];
+    }
+    if(orientationMask & 4) {
+        [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationLandscapeLeft]];
+    }
+    if(orientationMask & 8) {
+        [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationLandscapeRight]];
+    }
+    
+    SEL selector = NSSelectorFromString(@"setSupportedOrientations:");
+    
+    if([vc respondsToSelector:selector]) {
+        ((void (*)(CDVViewController*, SEL, NSMutableArray*))objc_msgSend)(vc,selector,result);
+        pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
+    }
+    else {
+        pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_INVALID_ACTION                messageAsString:@"Error calling to set supported orientations"];
+    }
+    
+    [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
+    
+}
+
+@end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/src/ios/CDVViewController+UpdateSupportedOrientations.h
----------------------------------------------------------------------
diff --git a/src/ios/CDVViewController+UpdateSupportedOrientations.h b/src/ios/CDVViewController+UpdateSupportedOrientations.h
deleted file mode 100644
index 6cff917..0000000
--- a/src/ios/CDVViewController+UpdateSupportedOrientations.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#import <Cordova/CDVViewController.h>
-
-@interface CDVViewController (UpdateSupportedOrientations)
-
-- (void)updateSupportedOrientations:(NSArray *)orientations;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/src/ios/CDVViewController+UpdateSupportedOrientations.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVViewController+UpdateSupportedOrientations.m b/src/ios/CDVViewController+UpdateSupportedOrientations.m
deleted file mode 100644
index b930923..0000000
--- a/src/ios/CDVViewController+UpdateSupportedOrientations.m
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#import "CDVViewController+UpdateSupportedOrientations.h"
-
-@implementation CDVViewController (UpdateSupportedOrientations)
-
-- (void)updateSupportedOrientations:(NSArray *)orientations {
-
-	[self setValue:orientations forKey:@"supportedOrientations"];
-
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/src/ios/YoikScreenOrientation.h
----------------------------------------------------------------------
diff --git a/src/ios/YoikScreenOrientation.h b/src/ios/YoikScreenOrientation.h
deleted file mode 100644
index f2d4c67..0000000
--- a/src/ios/YoikScreenOrientation.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#import <Cordova/CDVPlugin.h>
-#import <Cordova/CDVViewController.h>
-
-@interface YoikScreenOrientation : CDVPlugin
-
-- (void)screenOrientation:(CDVInvokedUrlCommand *)command;
-@property (strong, nonatomic) NSArray *originalSupportedOrientations;
-
-@end
-
-@interface ForcedViewController : UIViewController
-
-@property (strong, nonatomic) NSString *calledWith;
-
-@end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/src/ios/YoikScreenOrientation.m
----------------------------------------------------------------------
diff --git a/src/ios/YoikScreenOrientation.m b/src/ios/YoikScreenOrientation.m
deleted file mode 100644
index 3008b0c..0000000
--- a/src/ios/YoikScreenOrientation.m
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#import "YoikScreenOrientation.h"
-#import "CDVViewController+UpdateSupportedOrientations.h"
-
-@implementation YoikScreenOrientation
-
--(void)screenOrientation:(CDVInvokedUrlCommand *)command
-{
-    [self.commandDelegate runInBackground:^{
-
-        if(self.originalSupportedOrientations == nil) {
-            self.originalSupportedOrientations = [self.viewController valueForKey:@"supportedOrientations"];
-        }
-
-        NSArray* arguments = command.arguments;
-        NSString* orientationIn = [arguments objectAtIndex:1];
-
-        if ([orientationIn isEqual: @"unlocked"]) {
-            [(CDVViewController*)self.viewController updateSupportedOrientations:self.originalSupportedOrientations];
-            self.originalSupportedOrientations = nil;
-            return;
-        }
-        
-        // grab the device orientation so we can pass it back to the js side.
-        NSString *orientation;
-        switch ([[UIDevice currentDevice] orientation]) {
-            case UIDeviceOrientationLandscapeLeft:
-                orientation = @"landscape-secondary";
-                break;
-            case UIDeviceOrientationLandscapeRight:
-                orientation = @"landscape-primary";
-                break;
-            case UIDeviceOrientationPortrait:
-                orientation = @"portrait-primary";
-                break;
-            case UIDeviceOrientationPortraitUpsideDown:
-                orientation = @"portrait-secondary";
-                break;
-            default:
-                orientation = @"portait";
-                break;
-        }
-
-        // we send the result prior to the view controller presentation so that the JS side
-        // is ready for the unlock call.
-        CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK
-            messageAsDictionary:@{@"device":orientation}];
-        [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
-
-        // SEE https://github.com/Adlotto/cordova-plugin-recheck-screen-orientation
-        // HACK: Force rotate by changing the view hierarchy.
-		ForcedViewController *vc = [[ForcedViewController alloc] init];
-        vc.calledWith = orientationIn;
-
-        // backgound should be transparent as it is briefly visible
-        // prior to closing.
-        vc.view.backgroundColor = [UIColor clearColor];
-        // vc.view.alpha = 0.0;
-        vc.view.opaque = YES;
-
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
-        // This stops us getting the black application background flash, iOS8
-        vc.modalPresentationStyle = UIModalPresentationOverFullScreen;
-#endif
-
-        dispatch_async(dispatch_get_main_queue(), ^{
-            [self.viewController presentViewController:vc animated:NO completion:nil];
-        });
-
-    }];
-}
-
-@end
-
-@implementation ForcedViewController
-
--(void) viewDidAppear:(BOOL)animated {
-	CDVViewController *presenter = (CDVViewController*)self.presentingViewController;
-	
-	if ([self.calledWith rangeOfString:@"portrait"].location != NSNotFound) {
-		[presenter updateSupportedOrientations:@[[NSNumber numberWithInt:UIInterfaceOrientationPortrait]]];
-
-	} else if([self.calledWith rangeOfString:@"landscape"].location != NSNotFound) {
-		[presenter updateSupportedOrientations:@[[NSNumber numberWithInt:UIInterfaceOrientationLandscapeLeft], [NSNumber numberWithInt:UIInterfaceOrientationLandscapeRight]]];
-	} else {
-		[presenter updateSupportedOrientations:@[[NSNumber numberWithInt:UIInterfaceOrientationLandscapeLeft], [NSNumber numberWithInt:UIInterfaceOrientationLandscapeRight], [NSNumber numberWithInt:UIInterfaceOrientationPortrait]]];
-	}
-	[presenter dismissViewControllerAnimated:NO completion:nil];
-}
-
-- (UIInterfaceOrientationMask) supportedInterfaceOrientations
-{
-    if ([self.calledWith rangeOfString:@"portrait"].location != NSNotFound) {
-        return UIInterfaceOrientationMaskPortrait;
-    } else if([self.calledWith rangeOfString:@"landscape"].location != NSNotFound) {
-        return UIInterfaceOrientationMaskLandscape;
-    }
-    return UIInterfaceOrientationMaskAll;
-}
-@end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/src/windows/.DS_Store
----------------------------------------------------------------------
diff --git a/src/windows/.DS_Store b/src/windows/.DS_Store
new file mode 100644
index 0000000..3d5dcd0
Binary files /dev/null and b/src/windows/.DS_Store differ

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/src/windows/CDVOrientation.cs
----------------------------------------------------------------------
diff --git a/src/windows/CDVOrientation.cs b/src/windows/CDVOrientation.cs
new file mode 100644
index 0000000..76a6b46
--- /dev/null
+++ b/src/windows/CDVOrientation.cs
@@ -0,0 +1,58 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var DisplayInfo = Windows.Graphics.Display.DisplayInformation;
+    var Orientations = Windows.Graphics.Display.DisplayOrientations;
+
+module.exports = {
+    setAllowedOrientations: function (win, fail, args) {
+        //console.log("setAllowedOrientations proxy called with " + args);
+
+        try {
+            var prefOrients = args[0];
+            var winPrefs = 0;
+
+            if (prefOrients & 1) { // UIInterfaceOrientationPortrait
+                winPrefs = winPrefs |  Orientations.portrait;
+            }
+            if (prefOrients & 2) { // UIInterfaceOrientationPortraitUpsideDown
+                winPrefs = winPrefs | Orientations.portraitFlipped;
+            }
+            if(prefOrients & 4) { // UIInterfaceOrientationLandscapeLeft
+                winPrefs = winPrefs | Orientations.landscape;
+            }
+            if (prefOrients & 8) { // UIInterfaceOrientationLandscapeRight
+                winPrefs = winPrefs | Orientations.landscapeFlipped;
+            }
+            setTimeout(function () {
+                DisplayInfo.autoRotationPreferences = winPrefs;
+                win();
+            }, 0);
+        }
+        catch (err) {
+            console.log("error :: " + err);
+            fail();
+        }
+
+    }
+}
+
+require("cordova/exec/proxy").add("CDVOrientation", module.exports);

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/src/wp/YoikScreenOrientation.cs
----------------------------------------------------------------------
diff --git a/src/wp/YoikScreenOrientation.cs b/src/wp/YoikScreenOrientation.cs
deleted file mode 100644
index 2108c54..0000000
--- a/src/wp/YoikScreenOrientation.cs
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-using System;
-using System.Net;
-using System.IO;
-using Microsoft.Phone.Controls;
-using Microsoft.Phone.Notification;
-using Microsoft.Phone.Shell;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Documents;
-using System.Windows.Ink;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Shapes;
-using System.Windows.Threading;
-using System.Runtime.Serialization;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Globalization;
-using System.Threading;
-
-using WPCordovaClassLib.Cordova;
-using WPCordovaClassLib.Cordova.Commands;
-using WPCordovaClassLib.Cordova.JSON;
-
-
-namespace WPCordovaClassLib.Cordova.Commands
-{
-    public class YoikScreenOrientation : BaseCommand
-    {
-        #region Static members
-        private const string UNLOCKED = "unlocked";
-
-        private const string PORTRAIT = "portrait";
-        private const string PORTRAIT_PRIMARY = "portrait-primary";
-        private const string PORTRAIT_SECONDARY = "portrait-secondary";
-
-        private const string LANDSCAPE = "landscape";
-        private const string LANDSCAPE_PRIMARY = "landscape-primary";
-        private const string LANDSCAPE_SECONDARY = "landscape-secondary";
-
-        #endregion
-
-        /// <summary>
-        /// Current orientation
-        /// </summary>
-        private string currentOrientation;
-
-        public YoikScreenOrientation()
-        {
-
-        }
-
-        /// <summary>
-        /// Changes the orientation
-        /// </summary>
-
-        public void screenOrientation(string options)
-        {
-            string orientation = null;
-            try
-            {
-                orientation = JSON.JsonHelper.Deserialize<string[]>(options)[0];
-            }
-            catch (Exception ex)
-            {
-                this.DispatchCommandResult(new PluginResult(PluginResult.Status.JSON_EXCEPTION, ex.Message));
-                return;
-            }
-
-            if (string.IsNullOrEmpty(orientation))
-            {
-                this.DispatchCommandResult(new PluginResult(PluginResult.Status.JSON_EXCEPTION));
-                return;
-            }
-
-            if (this.currentOrientation != orientation) // Might prevent flickering
-            {
-
-                Deployment.Current.Dispatcher.BeginInvoke(() =>
-                {
-                    PhoneApplicationFrame frame;
-                    PhoneApplicationPage page;
-                    if (TryCast(Application.Current.RootVisual, out frame) &&
-                      TryCast(frame.Content, out page))
-                    {
-                        if (orientation == PORTRAIT || orientation == PORTRAIT_PRIMARY || orientation == PORTRAIT_SECONDARY)
-                        {
-                            page.SupportedOrientations = SupportedPageOrientation.Portrait;
-                        }
-
-                        else if (orientation == LANDSCAPE || orientation == LANDSCAPE_PRIMARY || orientation == LANDSCAPE_SECONDARY)
-                        {
-                            page.SupportedOrientations = SupportedPageOrientation.Landscape;
-                        }
-                        else if (orientation == UNLOCKED)
-                        {
-                            page.SupportedOrientations = SupportedPageOrientation.PortraitOrLandscape;
-                        }
-                        else
-                        {
-                            this.DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, "Screen orientation not detected."));
-                            return;
-                        }
-                        this.currentOrientation = orientation;
-                    }
-                });
-
-                this.DispatchCommandResult();
-            }
-        }
-
-        static bool TryCast<T>(object obj, out T result) where T : class
-        {
-            result = obj as T;
-            return result != null;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/www/.DS_Store
----------------------------------------------------------------------
diff --git a/www/.DS_Store b/www/.DS_Store
new file mode 100644
index 0000000..e5fb5fa
Binary files /dev/null and b/www/.DS_Store differ

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/www/screenorientation.android.js
----------------------------------------------------------------------
diff --git a/www/screenorientation.android.js b/www/screenorientation.android.js
deleted file mode 100644
index 1b8857e..0000000
--- a/www/screenorientation.android.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var exec = require('cordova/exec'),
-    screenOrientation = {};
-
-screenOrientation.setOrientation = function(orientation) {
-    exec(null, null, "YoikScreenOrientation", "screenOrientation", ['set', orientation]);
-};
-
-module.exports = screenOrientation;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/www/screenorientation.ios.js
----------------------------------------------------------------------
diff --git a/www/screenorientation.ios.js b/www/screenorientation.ios.js
deleted file mode 100644
index c6882f4..0000000
--- a/www/screenorientation.ios.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var exec = require('cordova/exec'),
-    screenOrientation = {},
-    iosOrientation = 'unlocked',
-    orientationMap  = {
-        'portrait': [0,180],
-        'portrait-primary': [0],
-        'portrait-secondary': [180],
-        'landscape': [-90,90],
-        'landscape-primary': [-90],
-        'landscape-secondary': [90],
-        'default': [-90,90,0,180]
-    };
-
-screenOrientation.setOrientation = function(orientation) {
-    iosOrientation = orientation;
-
-    var success = function(res) {
-        if (orientation === 'unlocked' && res.device) {
-            iosOrientation = res.device;
-            setTimeout(function() {
-                iosOrientation = 'unlocked';
-            },300);
-        }
-    };
-
-    exec(success, null, "YoikScreenOrientation", "screenOrientation", ['set', orientation]);
-};
-
-module.exports = screenOrientation;
-
-// ios orientation callback/hook
-window.shouldRotateToOrientation = function(orientation) {
-    var map = orientationMap[iosOrientation] || orientationMap['default'];
-    return map.indexOf(orientation) >= 0;
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/www/screenorientation.js
----------------------------------------------------------------------
diff --git a/www/screenorientation.js b/www/screenorientation.js
index dd0a596..ac468f7 100644
--- a/www/screenorientation.js
+++ b/www/screenorientation.js
@@ -17,78 +17,101 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 
-var screenOrientation = {},
-    Orientations = [
-        'portrait-primary',
-        // The orientation is in the primary portrait mode.
-        'portrait-secondary',
-        // The orientation is in the secondary portrait mode.
-        'landscape-primary',
-        // The orientation is in the primary landscape mode.
-        'landscape-secondary',
-        // The orientation is in the secondary landscape mode.
-        'portrait',
-        // The orientation is either portrait-primary or portrait-secondary.
-        'landscape'
-        // The orientation is either landscape-primary or landscape-secondary.
-    ];
+               var screenOrientation = {},
+               Orientations = [
+                               'portrait-primary',
+                               // The orientation is in the primary portrait mode.
+                               'portrait-secondary',
+                               // The orientation is in the secondary portrait mode.
+                               'landscape-primary',
+                               // The orientation is in the primary landscape mode.
+                               'landscape-secondary',
+                               // The orientation is in the secondary landscape mode.
+                               'portrait',
+                               // The orientation is either portrait-primary or portrait-secondary.
+                               'landscape'
+                               // The orientation is either landscape-primary or landscape-secondary.
+                               ];
 
-screenOrientation.Orientations = Orientations;
-screenOrientation.currOrientation = 'unlocked';
+               screenOrientation.Orientations = Orientations;
+               screenOrientation.currOrientation = 'natural';
+               var orientationMask = 0;
+               screenOrientation.setOrientation = function(orientation) {
+               if(orientation == 'portrait-primary'){
+               orientationMask = 1;
+               }
+               else if(orientation == 'portrait-secondary'){
+               orientationMask = 2;
+               }
+               else if(orientation == 'landscape-primary'){
+               orientationMask = 4;
+               }
+               else if(orientation == 'landscape-secondary'){
+               orientationMask = 8;
+               }
+               else if(orientation == 'portrait'){
+               orientationMask = 3;
+               }
+               else if(orientation == 'landscape'){
+               orientationMask = 12;
+               }
+               else if(orientation == 'natural'){
+               orientationMask = 15;
+               }
 
-screenOrientation.setOrientation = function(orientation) {
-    //platform specific files override this function
-    console.log('setOrientation not supported on device');
-};
 
-function addScreenOrientationApi(screenObject) {
-    if (screenObject.unlockOrientation || screenObject.lockOrientation) {
-        return;
-    }
+               cordova.exec(null, null, "CDVOrientation", "screenOrientation", [orientationMask, orientation]);
+               //console.log('setOrientation not supported on device');
+               };
 
-    screenObject.lockOrientation = function(orientation) {
-        if (Orientations.indexOf(orientation) == -1) {
-            console.log('INVALID ORIENTATION', orientation);
-            return;
-        }
-        screenOrientation.currOrientation = screenObject.orientation = orientation;
-        screenOrientation.setOrientation(orientation);
-    };
+               function addScreenOrientationApi(screenObject) {
+               if (screenObject.unlockOrientation || screenObject.lockOrientation) {
+               return;
+               }
 
-    screenObject.unlockOrientation = function() {
-        screenOrientation.currOrientation = screenObject.orientation = 'unlocked';
-        screenOrientation.setOrientation('unlocked');
-    };
-}
+               screenObject.lockOrientation = function(orientation) {
+               if (Orientations.indexOf(orientation) == -1) {
+               console.log('INVALID ORIENTATION', orientation);
+               return;
+               }
+               screenOrientation.currOrientation = screenObject.orientation = orientation;
+               screenOrientation.setOrientation(orientation);
+               };
 
-addScreenOrientationApi(screen);
-orientationChange();
+               screenObject.unlockOrientation = function() {
+               screenOrientation.currOrientation = screenObject.orientation = 'natural';
+               screenOrientation.setOrientation('natural');
+               };
+               }
 
-function orientationChange() {
-    var orientation;
+               addScreenOrientationApi(screen);
+               orientationChange();
 
-    switch (window.orientation) {
-        case 0:
-             orientation = 'portrait-primary';
-             break;
-        case 90:
-            orientation = 'landscape-primary';
-            break;
-        case 180:
-            orientation = 'portrait-secondary';
-            break;
-        case -90:
-            orientation = 'landscape-secondary';
-            break;
-        default:
-            orientation = 'unknown';
-    }
+               function orientationChange() {
+               var orientation;
 
-    screen.orientation = orientation;
-}
+               switch (window.orientation) {
+               case 0:
+               orientation = 'portrait-primary';
+               break;
+               case 90:
+               orientation = 'landscape-primary';
+               break;
+               case 180:
+               orientation = 'portrait-secondary';
+               break;
+               case -90:
+               orientation = 'landscape-secondary';
+               break;
+               default:
+               orientation = 'unknown';
+               }
 
-window.addEventListener("orientationchange", orientationChange, true);
+               screen.orientation = orientation;
+               }
 
-module.exports = screenOrientation;
\ No newline at end of file
+               window.addEventListener("orientationchange", orientationChange, true);
+
+               module.exports = screenOrientation;

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/www/screenorientation.windows.js
----------------------------------------------------------------------
diff --git a/www/screenorientation.windows.js b/www/screenorientation.windows.js
deleted file mode 100644
index a1b3af0..0000000
--- a/www/screenorientation.windows.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var screenOrientation = {};
-
-screenOrientation.setOrientation = function (orientation) {
-    var orientationNumber;
-    switch (orientation) {
-        case 'landscape':
-            orientationNumber = 5;
-            break;
-        case 'portrait':
-            orientationNumber = 10;
-            break;
-        case 'landscape-primary':
-            orientationNumber = 1;
-            break;
-        case 'landscape-secondary':
-            orientationNumber = 4;
-            break;
-        case 'portrait-primary':
-            orientationNumber = 2;
-            break;
-        case 'portrait-secondary':
-            orientationNumber = 8;
-            break;
-        case 'unlocked':
-            orientationNumber = 0;
-            break;
-        default:
-            break;
-    }
-    Windows.Graphics.Display.DisplayInformation.autoRotationPreferences = orientationNumber;
-};
-
-module.exports = screenOrientation;

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/2d8500f6/www/screenorientation.wp8.js
----------------------------------------------------------------------
diff --git a/www/screenorientation.wp8.js b/www/screenorientation.wp8.js
deleted file mode 100644
index 8712c26..0000000
--- a/www/screenorientation.wp8.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var exec = require('cordova/exec'),
-    screenOrientation = {};
-
-screenOrientation.setOrientation = function(orientation) {
-    exec(null, null, "YoikScreenOrientation", "screenOrientation", [orientation]);
-};
-
-module.exports = screenOrientation;
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[10/16] cordova-plugin-screen-orientation git commit: rectified Readme

Posted by pu...@apache.org.
 rectified Readme


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/f2f2dbde
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/f2f2dbde
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/f2f2dbde

Branch: refs/heads/master
Commit: f2f2dbde729b9d3ac5884de6ee80ae354a3bf5ef
Parents: 35f68c9
Author: maverickmishra <vi...@gmail.com>
Authored: Mon Oct 17 16:29:20 2016 -0700
Committer: maverickmishra <vi...@gmail.com>
Committed: Mon Oct 17 16:29:20 2016 -0700

----------------------------------------------------------------------
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/f2f2dbde/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index dd306f1..a632e6f 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@
 
 # Cordova Screen Orientation Plugin
 
-Cordova plugin to set/lock the screen orientation in a common way for iOS, Android, WP8 and Blackberry 10.  This plugin is based on [Screen Orientation API](http://www.w3.org/TR/screen-orientation/) so the api does not currently match the current spec.
+Cordova plugin to set/lock the screen orientation in a common way for iOS, Android, WP8 and Blackberry 10.  This plugin is based on [Screen Orientation API](http://www.w3.org/TR/screen-orientation/) so the api matches the current spec.
 
 The plugin adds the following to the screen object (`window.screen`):
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[04/16] cordova-plugin-screen-orientation git commit: changed orientation spec and modified Readme

Posted by pu...@apache.org.
 changed orientation spec and modified Readme


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/c00a7c4b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/c00a7c4b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/c00a7c4b

Branch: refs/heads/master
Commit: c00a7c4b8546694b8fd96f119a2c845bc13e2c71
Parents: 86a9c81
Author: maverickmishra <vi...@gmail.com>
Authored: Tue Aug 30 17:11:10 2016 -0700
Committer: maverickmishra <vi...@gmail.com>
Committed: Tue Aug 30 17:11:10 2016 -0700

----------------------------------------------------------------------
 README.md                       | 32 ++++++--------------------------
 src/android/CDVOrientation.java |  5 ++---
 www/screenorientation.js        | 10 +++++-----
 3 files changed, 13 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/c00a7c4b/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 9cd5d8c..af4b755 100644
--- a/README.md
+++ b/README.md
@@ -67,6 +67,9 @@ cordova plugin add cordova-plugin-screen-orientation
 #### landscape
 > The orientation is either landscape-primary or landscape-secondary (sensor).
 
+#### any
+>  orientation is  landscape-primary or landscape-secondary (sensor).
+
 ## Usage
 
 ```js
@@ -101,38 +104,15 @@ window.addEventListener("orientationchange", function(){
 
 The __screen.orientation__ property will not update when the phone is [rotated 180 degrees](http://www.quirksmode.org/dom/events/orientationchange.html).
 
-## iOS Notes
-
-The iOS version is a combination of the cordova JS callback _window.shouldRotateToOrientation_ and the workaround to recheck the orientation as implemented in https://github.com/Adlotto/cordova-plugin-recheck-screen-orientation.
-
-__If you have a custom implementation of the _window.shouldRotateToOrientation_ it will have to be removed for the plugin to function as expected.__
-
-#### iOS6
-
-There has been a few cases where the rotation does not change the width of the viewport
-
-Issue [#1](https://github.com/gbenvenuti/cordova-plugin-screen-orientation/issues/1) @dokterbob
-
->It seems to be related to having width=device-width, height=device-height in the meta viewport (which is part of the boilerplate phonegap/cordova app). It can be solved by updating the viewport with width=device-height, height=device-width or simply removing width and height altogether.
-
-#### iOS8
-
-Versions prior to 1.2.0 will cause an application crash in iOS8 due to a change in presentViewController timing.
-
 ## BB10 Notes
 
 Wraps the com.blackberry.app plugin functions, auto installed as a dependancy.
 
-## WP8 Notes
-
-Windows phone does not support specification or primary and secondary orientations.  If called with a specific orientation the plugin will just apply the landscape or portait orientation.
-
-## W8.1 Notes
-
-Windows 8.1 Applicaitons (runtime/metro applications) will only display orientation changes if the device has some sort of accelerometer.  The internal state of the "orientation" will still be kept, but the actual screen won't rotate unless the device supports it.
-
 # Changelog
 
+## 2.0
+* Common javascript for iOS, Android and Windows.
+
 ## 1.4.2
 * [#101](https://github.com/gbenvenuti/cordova-plugin-screen-orientation/pull/101) make iOS rotate as needed when lockOrientation is called
 

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/c00a7c4b/src/android/CDVOrientation.java
----------------------------------------------------------------------
diff --git a/src/android/CDVOrientation.java b/src/android/CDVOrientation.java
index 3def795..c7dc207 100644
--- a/src/android/CDVOrientation.java
+++ b/src/android/CDVOrientation.java
@@ -33,13 +33,12 @@ import android.util.Log;
 
 public class CDVOrientation extends CordovaPlugin {
     
-    private static final String TAG = "YoikScreenOrientation";
     
     /**
      * Screen Orientation Constants
      */
     
-    private static final String UNLOCKED = "unlocked";
+    private static final String ANY = "any";
     private static final String PORTRAIT_PRIMARY = "portrait-primary";
     private static final String PORTRAIT_SECONDARY = "portrait-secondary";
     private static final String LANDSCAPE_PRIMARY = "landscape-primary";
@@ -74,7 +73,7 @@ public class CDVOrientation extends CordovaPlugin {
         
         Activity activity = cordova.getActivity();
         
-        if (orientation.equals(UNLOCKED)) {
+        if (orientation.equals(ANY)) {
             activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
         } else if (orientation.equals(LANDSCAPE_PRIMARY)) {
             activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/c00a7c4b/www/screenorientation.js
----------------------------------------------------------------------
diff --git a/www/screenorientation.js b/www/screenorientation.js
index ac468f7..77f1f9f 100644
--- a/www/screenorientation.js
+++ b/www/screenorientation.js
@@ -36,7 +36,7 @@
                                ];
 
                screenOrientation.Orientations = Orientations;
-               screenOrientation.currOrientation = 'natural';
+               screenOrientation.currOrientation = 'any';
                var orientationMask = 0;
                screenOrientation.setOrientation = function(orientation) {
                if(orientation == 'portrait-primary'){
@@ -57,7 +57,7 @@
                else if(orientation == 'landscape'){
                orientationMask = 12;
                }
-               else if(orientation == 'natural'){
+               else if(orientation == 'any'){
                orientationMask = 15;
                }
 
@@ -81,8 +81,8 @@
                };
 
                screenObject.unlockOrientation = function() {
-               screenOrientation.currOrientation = screenObject.orientation = 'natural';
-               screenOrientation.setOrientation('natural');
+               screenOrientation.currOrientation = screenObject.orientation = 'any';
+               screenOrientation.setOrientation('any');
                };
                }
 
@@ -106,7 +106,7 @@
                orientation = 'landscape-secondary';
                break;
                default:
-               orientation = 'unknown';
+               orientation = 'any';
                }
 
                screen.orientation = orientation;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[16/16] cordova-plugin-screen-orientation git commit: clean up merge package.json, add repo, engine, deps

Posted by pu...@apache.org.
clean up merge package.json, add repo, engine, deps


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/fe3beaed
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/fe3beaed
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/fe3beaed

Branch: refs/heads/master
Commit: fe3beaedae80f0aab18312205084d7c826d46e49
Parents: 0d18615 4432918
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Dec 13 15:48:19 2016 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Dec 13 15:48:19 2016 -0800

----------------------------------------------------------------------
 package.json | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/fe3beaed/package.json
----------------------------------------------------------------------
diff --cc package.json
index f931c95,75c1b1e..62177b7
--- a/package.json
+++ b/package.json
@@@ -4,12 -4,8 +4,12 @@@
    "description": "Adds Screen Orientation API lock and unlock functions to the global screen object in android, iOS, WP8, W8.1, and BB10.",
    "repository": {
      "type": "git",
-     "url": "git+https://github.com/gbenvenuti/cordova-plugin-screen-orientation.git"
+     "url": "https://github.com/apache/cordova-plugin-screen-orientation"
    },
 +  "scripts": {
 +    "test": "npm run jshint",
 +    "jshint": "node node_modules/jshint/bin/jshint www && node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint demo/www"
 +  },
    "cordova": {
      "id": "cordova-plugin-screen-orientation",
      "platforms": [
@@@ -29,11 -25,11 +29,14 @@@
    ],
    "author": "gbenvenuti",
    "license": "Apache-2.0",
-   "bugs": {
-     "url": "https://github.com/gbenvenuti/cordova-plugin-screen-orientation/issues"
-   },
-   "homepage": "https://github.com/gbenvenuti/cordova-plugin-screen-orientation#readme",
 +  "devDependencies": {
 +    "jshint": "^2.9.4"
-   }
- }
++  },
+   "engines": {
+       "cordovaDependencies": {
+         "3.0.0": {
+           "cordova": ">100"
+         }
+       }
 -    }  
 -}
++    }
++}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[08/16] cordova-plugin-screen-orientation git commit: added demo project and modified version

Posted by pu...@apache.org.
 added demo project and modified version


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/5d97d511
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/5d97d511
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/5d97d511

Branch: refs/heads/master
Commit: 5d97d51144c5b1dad40b650e160e3ef8bde41a1b
Parents: 84b013f
Author: maverickmishra <vi...@gmail.com>
Authored: Mon Oct 17 16:25:16 2016 -0700
Committer: maverickmishra <vi...@gmail.com>
Committed: Mon Oct 17 16:25:16 2016 -0700

----------------------------------------------------------------------
 README.md                |  13 +----
 demo/config.xml          |  26 ++++++++++
 demo/www/css/index.css   | 115 ++++++++++++++++++++++++++++++++++++++++++
 demo/www/img/logo.png    | Bin 0 -> 21814 bytes
 demo/www/index.html      |  58 +++++++++++++++++++++
 demo/www/js/index.js     |  96 +++++++++++++++++++++++++++++++++++
 package.json             |   2 +-
 plugin.xml               |   2 +-
 www/screenorientation.js |   2 +-
 9 files changed, 300 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/5d97d511/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index af4b755..51ee123 100644
--- a/README.md
+++ b/README.md
@@ -36,12 +36,6 @@ The plugin adds the following to the screen object (`window.screen`):
 
 ## Install
 
-_cordova < 4_
-
-```bash
-cordova plugin add net.yoik.cordova.plugins.screenorientation
-```
-_cordova > 4_
 
 ```bash
 cordova plugin add cordova-plugin-screen-orientation
@@ -68,7 +62,7 @@ cordova plugin add cordova-plugin-screen-orientation
 > The orientation is either landscape-primary or landscape-secondary (sensor).
 
 #### any
->  orientation is  landscape-primary or landscape-secondary (sensor).
+>  orientation is  unlocked - all orientations are supported.
 
 ## Usage
 
@@ -88,9 +82,6 @@ console.log('Orientation is ' + screen.orientation);
 Both android and iOS will fire the orientationchange event on the window object.
 For this version of the plugin use the window object if you require notification.
 
-For this plugin to follow the full API events should be fired on the screen object.
-iOS and BB10 do not currently support events on the _screen_ object so custom event
-handling will need to be added (Suggestions welcome!).
 
 ### Example usage
 
@@ -110,7 +101,7 @@ Wraps the com.blackberry.app plugin functions, auto installed as a dependancy.
 
 # Changelog
 
-## 2.0
+## 2.0.0
 * Common javascript for iOS, Android and Windows.
 
 ## 1.4.2

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/5d97d511/demo/config.xml
----------------------------------------------------------------------
diff --git a/demo/config.xml b/demo/config.xml
new file mode 100644
index 0000000..97595db
--- /dev/null
+++ b/demo/config.xml
@@ -0,0 +1,26 @@
+<?xml version='1.0' encoding='utf-8'?>
+<widget id="com.cordova.screenorientationdemo" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+    <name>ScreenOrientationDemo</name>
+    <description>
+        A sample Apache Cordova application that showcases the Screenorientation plugin.
+    </description>
+    <author email="dev@cordova.apache.org" href="http://cordova.io">
+        Apache Cordova Team
+    </author>
+    <content src="index.html" />
+    <plugin name="cordova-plugin-whitelist" spec="1" />
+    <access origin="*" />
+    <allow-intent href="http://*/*" />
+    <allow-intent href="https://*/*" />
+    <allow-intent href="tel:*" />
+    <allow-intent href="sms:*" />
+    <allow-intent href="mailto:*" />
+    <allow-intent href="geo:*" />
+    <platform name="android">
+        <allow-intent href="market:*" />
+    </platform>
+    <platform name="ios">
+        <allow-intent href="itms:*" />
+        <allow-intent href="itms-apps:*" />
+    </platform>
+</widget>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/5d97d511/demo/www/css/index.css
----------------------------------------------------------------------
diff --git a/demo/www/css/index.css b/demo/www/css/index.css
new file mode 100644
index 0000000..51daa79
--- /dev/null
+++ b/demo/www/css/index.css
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+* {
+    -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
+}
+
+body {
+    -webkit-touch-callout: none;                /* prevent callout to copy image, etc when tap to hold */
+    -webkit-text-size-adjust: none;             /* prevent webkit from resizing text to fit */
+    -webkit-user-select: none;                  /* prevent copy paste, to allow, change 'none' to 'text' */
+    background-color:#E4E4E4;
+    background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
+    background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
+    background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
+    background-image:-webkit-gradient(
+        linear,
+        left top,
+        left bottom,
+        color-stop(0, #A7A7A7),
+        color-stop(0.51, #E4E4E4)
+    );
+    background-attachment:fixed;
+    font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
+    font-size:12px;
+    height:100%;
+    margin:0px;
+    padding:0px;
+    text-transform:uppercase;
+    width:100%;
+}
+
+/* Portrait layout (default) */
+.app {
+    background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */
+    position:absolute;             /* position in the center of the screen */
+    left:50%;
+    top:50%;
+    height:50px;                   /* text area height */
+    width:225px;                   /* text area width */
+    text-align:center;
+    padding:180px 0px 0px 0px;     /* image height is 200px (bottom 20px are overlapped with text) */
+    margin:-115px 0px 0px -112px;  /* offset vertical: half of image height and text area height */
+                                   /* offset horizontal: half of text area width */
+}
+
+/* Landscape layout (with min-width) */
+@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
+    .app {
+        background-position:left center;
+        padding:75px 0px 75px 170px;  /* padding-top + padding-bottom + text area = image height */
+        margin:-90px 0px 0px -198px;  /* offset vertical: half of image height */
+                                      /* offset horizontal: half of image width and text area width */
+    }
+}
+
+h1 {
+    font-size:24px;
+    font-weight:normal;
+    margin:0px;
+    overflow:visible;
+    padding:0px;
+    text-align:center;
+}
+
+.event {
+    border-radius:4px;
+    -webkit-border-radius:4px;
+    color:#FFFFFF;
+    font-size:12px;
+    margin:0px 30px;
+    padding:2px 0px;
+}
+
+.event.listening {
+    background-color:#333333;
+    display:block;
+}
+
+.event.received {
+    background-color:#4B946A;
+    display:none;
+}
+
+@keyframes fade {
+    from { opacity: 1.0; }
+    50% { opacity: 0.4; }
+    to { opacity: 1.0; }
+}
+ 
+@-webkit-keyframes fade {
+    from { opacity: 1.0; }
+    50% { opacity: 0.4; }
+    to { opacity: 1.0; }
+}
+ 
+.blink {
+    animation:fade 3000ms infinite;
+    -webkit-animation:fade 3000ms infinite;
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/5d97d511/demo/www/img/logo.png
----------------------------------------------------------------------
diff --git a/demo/www/img/logo.png b/demo/www/img/logo.png
new file mode 100644
index 0000000..9519e7d
Binary files /dev/null and b/demo/www/img/logo.png differ

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/5d97d511/demo/www/index.html
----------------------------------------------------------------------
diff --git a/demo/www/index.html b/demo/www/index.html
new file mode 100644
index 0000000..36f0596
--- /dev/null
+++ b/demo/www/index.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+ 
+ http://www.apache.org/licenses/LICENSE-2.0
+ 
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+<html>
+    <head>
+        <!--
+         Customize this policy to fit your own app's needs. For more guidance, see:
+         https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md#content-security-policy
+         Some notes:
+         * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
+         * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
+         * Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
+         * Enable inline JS: add 'unsafe-inline' to default-src
+         -->
+        <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
+            <meta name="format-detection" content="telephone=no">
+                <meta name="msapplication-tap-highlight" content="no">
+                    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
+                        <link rel="stylesheet" type="text/css" href="css/index.css">
+                            <title>Hello World</title>
+                            </head>
+    <body>
+        <div class="app">
+            <h1>Apache Cordova</h1>
+            <div id="deviceready" class="blink">
+                <p class="event listening">Connecting to Device</p>
+                <p class="event received">Device is Ready</p>
+            </div>
+            <div>
+                <button id="btnPortrait">Portrait</button>
+                <button id="btnLandscape">Landscape</button>
+            </div>
+            <div>
+                <button id="btnPortPrimary">Portrait - Primary</button>
+                <button id="btnLandPrimary">Landscape - Primary</button>
+            </div>
+            <button id="btnAny">Any</button>
+        </div>
+        <script type="text/javascript" src="cordova.js"></script>
+        <script type="text/javascript" src="js/index.js"></script>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/5d97d511/demo/www/js/index.js
----------------------------------------------------------------------
diff --git a/demo/www/js/index.js b/demo/www/js/index.js
new file mode 100644
index 0000000..3df971c
--- /dev/null
+++ b/demo/www/js/index.js
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+var app = {
+    // Application Constructor
+    initialize: function() {
+        this.bindEvents();
+    },
+    // Bind Event Listeners
+    //
+    // Bind any events that are required on startup. Common events are:
+    // 'load', 'deviceready', 'offline', and 'online'.
+    bindEvents: function() {
+        document.addEventListener('deviceready', this.onDeviceReady, false);
+
+    },
+    // deviceready Event Handler
+    //
+    // The scope of 'this' is the event. In order to call the 'receivedEvent'
+    // function, we must explicitly call 'app.receivedEvent(...);'
+    onDeviceReady: function() {
+        app.receivedEvent('deviceready');
+        btnPortrait.addEventListener("click", function() {
+            //    alert('Orientation is ' + screen.orientation);
+            screen.lockOrientation('portrait').then(function(obj) {
+                console.log(obj);
+            }).catch(function(obj) {
+                console.log(obj);
+            });
+        });
+        btnLandscape.addEventListener("click", function() {
+            //    alert('Orientation is ' + screen.orientation);
+            screen.lockOrientation('landscape').then(function(obj) {
+                console.log(obj);
+            }).catch(function(obj) {
+                console.log(obj);
+            });
+        });
+        btnPortPrimary.addEventListener("click", function() {
+            //    alert('Orientation is ' + screen.orientation);
+            screen.lockOrientation('portrait-primary').then(function(obj) {
+                console.log(obj);
+            }).catch(function(obj) {
+                console.log(obj);
+            });
+        });
+        btnLandPrimary.addEventListener("click", function() {
+            //    alert('Orientation is ' + screen.orientation);
+            screen.lockOrientation('landscape-primary').then(function(obj) {
+                console.log(obj);
+            }).catch(function(obj) {
+                console.log(obj);
+            });
+        });
+        btnAny.addEventListener("click", function() {
+            //    alert('Orientation is ' + screen.orientation);
+            screen.lockOrientation('any').then(function(obj) {
+                console.log(obj);
+            }).catch(function(obj) {
+                console.log(obj);
+            });
+        });
+
+
+
+
+    },
+    // Update DOM on a Received Event
+    receivedEvent: function(id) {
+        var parentElement = document.getElementById(id);
+        var listeningElement = parentElement.querySelector('.listening');
+        var receivedElement = parentElement.querySelector('.received');
+
+        listeningElement.setAttribute('style', 'display:none;');
+        receivedElement.setAttribute('style', 'display:block;');
+
+        console.log('Received Event: ' + id);
+    }
+};
+
+app.initialize();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/5d97d511/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 62589d9..b440fa4 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "cordova-plugin-screen-orientation",
-  "version": "1.4.2",
+  "version": "2.0.0-dev",
   "description": "Adds Screen Orientation API lock and unlock functions to the global screen object in android, iOS, WP8, W8.1, and BB10.",
   "repository": {
     "type": "git",

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/5d97d511/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 205a6a5..b777d6f 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -18,7 +18,7 @@
 
 <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
     id="cordova-plugin-screen-orientation"
-    version="1.4.2">
+    version="2.0.0-dev">
     
     <name>Screen Orientation</name>
     <description>Adds Screen Orientation API lock and unlock functions to the global screen object in android, iOS, WP8, W8.1, and BB10.</description>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/5d97d511/www/screenorientation.js
----------------------------------------------------------------------
diff --git a/www/screenorientation.js b/www/screenorientation.js
index e03f7ee..d574faa 100644
--- a/www/screenorientation.js
+++ b/www/screenorientation.js
@@ -35,7 +35,7 @@ cordova.define("cordova-plugin-screen-orientation.screenorientation", function(r
                                'landscape',
                                // The orientation is either landscape-primary or landscape-secondary.
                                'any'
-                               // All orientations are supported
+                               // All orientations are supported (unlocked orientation)
                                ];
 
                screenOrientation.Orientations = Orientations;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[03/16] cordova-plugin-screen-orientation git commit: removed .DS_Store files

Posted by pu...@apache.org.
 removed .DS_Store files


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/86a9c813
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/86a9c813
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/86a9c813

Branch: refs/heads/master
Commit: 86a9c8131d7d40906a92b6cc2ff395112fdf7039
Parents: dd13eb5
Author: maverickmishra <vi...@gmail.com>
Authored: Mon Aug 29 16:31:24 2016 -0700
Committer: maverickmishra <vi...@gmail.com>
Committed: Mon Aug 29 16:31:24 2016 -0700

----------------------------------------------------------------------
 .DS_Store             | Bin 6148 -> 0 bytes
 src/.DS_Store         | Bin 8196 -> 0 bytes
 src/android/.DS_Store | Bin 6148 -> 0 bytes
 src/ios/.DS_Store     | Bin 6148 -> 0 bytes
 src/windows/.DS_Store | Bin 6148 -> 0 bytes
 www/.DS_Store         | Bin 6148 -> 0 bytes
 6 files changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/86a9c813/.DS_Store
----------------------------------------------------------------------
diff --git a/.DS_Store b/.DS_Store
deleted file mode 100644
index 76433a1..0000000
Binary files a/.DS_Store and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/86a9c813/src/.DS_Store
----------------------------------------------------------------------
diff --git a/src/.DS_Store b/src/.DS_Store
deleted file mode 100644
index 1c7cb28..0000000
Binary files a/src/.DS_Store and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/86a9c813/src/android/.DS_Store
----------------------------------------------------------------------
diff --git a/src/android/.DS_Store b/src/android/.DS_Store
deleted file mode 100644
index 351e7f3..0000000
Binary files a/src/android/.DS_Store and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/86a9c813/src/ios/.DS_Store
----------------------------------------------------------------------
diff --git a/src/ios/.DS_Store b/src/ios/.DS_Store
deleted file mode 100644
index 810f0b6..0000000
Binary files a/src/ios/.DS_Store and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/86a9c813/src/windows/.DS_Store
----------------------------------------------------------------------
diff --git a/src/windows/.DS_Store b/src/windows/.DS_Store
deleted file mode 100644
index 3d5dcd0..0000000
Binary files a/src/windows/.DS_Store and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/86a9c813/www/.DS_Store
----------------------------------------------------------------------
diff --git a/www/.DS_Store b/www/.DS_Store
deleted file mode 100644
index e5fb5fa..0000000
Binary files a/www/.DS_Store and /dev/null differ


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[09/16] cordova-plugin-screen-orientation git commit: modified Readme

Posted by pu...@apache.org.
 modified Readme


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/35f68c98
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/35f68c98
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/35f68c98

Branch: refs/heads/master
Commit: 35f68c985e0daa3fc9704b08a1a145df2a93adc0
Parents: 5d97d51
Author: maverickmishra <vi...@gmail.com>
Authored: Mon Oct 17 16:27:43 2016 -0700
Committer: maverickmishra <vi...@gmail.com>
Committed: Mon Oct 17 16:27:43 2016 -0700

----------------------------------------------------------------------
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/35f68c98/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 51ee123..dd306f1 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@
 
 # Cordova Screen Orientation Plugin
 
-Cordova plugin to set/lock the screen orientation in a common way for iOS, Android, WP8 and Blackberry 10.  This plugin is based on an early version of [Screen Orientation API](http://www.w3.org/TR/screen-orientation/) so the api does not currently match the current spec.
+Cordova plugin to set/lock the screen orientation in a common way for iOS, Android, WP8 and Blackberry 10.  This plugin is based on [Screen Orientation API](http://www.w3.org/TR/screen-orientation/) so the api does not currently match the current spec.
 
 The plugin adds the following to the screen object (`window.screen`):
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[07/16] cordova-plugin-screen-orientation git commit: added comments and formatted code

Posted by pu...@apache.org.
added comments and formatted code


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/84b013f1
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/84b013f1
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/84b013f1

Branch: refs/heads/master
Commit: 84b013f17c71922fa42bfd9185dbc9be3a1fe831
Parents: 90f5f25
Author: maverickmishra <vi...@gmail.com>
Authored: Mon Oct 17 11:12:53 2016 -0700
Committer: maverickmishra <vi...@gmail.com>
Committed: Mon Oct 17 11:12:53 2016 -0700

----------------------------------------------------------------------
 www/screenorientation.js | 37 +++++++++++++++++--------------------
 1 file changed, 17 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/84b013f1/www/screenorientation.js
----------------------------------------------------------------------
diff --git a/www/screenorientation.js b/www/screenorientation.js
index 8aaa51f..e03f7ee 100644
--- a/www/screenorientation.js
+++ b/www/screenorientation.js
@@ -32,33 +32,35 @@ cordova.define("cordova-plugin-screen-orientation.screenorientation", function(r
                                // The orientation is in the secondary landscape mode.
                                'portrait',
                                // The orientation is either portrait-primary or portrait-secondary.
-                               'landscape'
+                               'landscape',
                                // The orientation is either landscape-primary or landscape-secondary.
+                               'any'
+                               // All orientations are supported
                                ];
 
                screenOrientation.Orientations = Orientations;
                screenOrientation.currOrientation = 'any';
                var orientationMask = 0;
                screenOrientation.setOrientation = function(orientation) {
-               if(orientation == 'portrait-primary'){
+               if(orientation == Orientations[0]){
                orientationMask = 1;
                }
-               else if(orientation == 'portrait-secondary'){
+               else if(orientation == Orientations[1]){
                orientationMask = 2;
                }
-               else if(orientation == 'landscape-primary'){
+               else if(orientation == Orientations[2]){
                orientationMask = 4;
                }
-               else if(orientation == 'landscape-secondary'){
+               else if(orientation == Orientations[3]){
                orientationMask = 8;
                }
-               else if(orientation == 'portrait'){
+               else if(orientation == Orientations[4]){
                orientationMask = 3;
                }
-               else if(orientation == 'landscape'){
+               else if(orientation == Orientations[5]){
                orientationMask = 12;
                }
-               else if(orientation == 'any'){
+               else if(orientation == Orientations[6]){
                orientationMask = 15;
                }
 
@@ -73,29 +75,24 @@ cordova.define("cordova-plugin-screen-orientation.screenorientation", function(r
                }
 
                screenObject.lockOrientation = function(orientation) {
-
+               
                var p = new Promise(function(resolve,reject){
                                    if (Orientations.indexOf(orientation) == -1) {
-                                   //   console.log('INVALID ORIENTATION', orientation);
                                    var err = new Error();
                                    err.name = "NotSupportedError";
-
+                                   
                                    reject(err);//"cannot change orientation");
-
+                                   
                                    }
                                    else {
                                 screenOrientation.currOrientation = screenObject.orientation = orientation;
                                 screenOrientation.setOrientation(orientation);
-                                   resolve("Orientation changed"); // orientation change successful
+                                   resolve("Orientation set"); // orientation change successful
                                    }
-
-
-
-
-                                   });
+                                  });
                return p;
-
-
+               
+              
                };
 
                screenObject.unlockOrientation = function() {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[02/16] cordova-plugin-screen-orientation git commit: add gitignore and npmignore files

Posted by pu...@apache.org.
 add gitignore and npmignore files


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/dd13eb5b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/dd13eb5b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/dd13eb5b

Branch: refs/heads/master
Commit: dd13eb5bdf7de9d766aba72416c9258b8f6c69a3
Parents: 2d8500f
Author: maverickmishra <vi...@gmail.com>
Authored: Mon Aug 29 16:23:51 2016 -0700
Committer: maverickmishra <vi...@gmail.com>
Committed: Mon Aug 29 16:23:51 2016 -0700

----------------------------------------------------------------------
 .gitignore | 29 +++++++++++++++++++++++++++++
 .npmignore |  2 ++
 2 files changed, 31 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/dd13eb5b/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6df9abc
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,29 @@
+\ufeff#If ignorance is bliss, then somebody knock the smile off my face
+
+*.csproj.user
+*.suo
+*.cache
+Thumbs.db
+*.DS_Store
+
+*.bak
+*.cache
+*.log
+*.swp
+*.user
+
+demo/hooks/
+demo/platforms/
+demo/plugins/
+
+.vscode/
+
+
+
+
+
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/dd13eb5b/.npmignore
----------------------------------------------------------------------
diff --git a/.npmignore b/.npmignore
new file mode 100644
index 0000000..62e8c49
--- /dev/null
+++ b/.npmignore
@@ -0,0 +1,2 @@
+demo/
+tests/


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[15/16] cordova-plugin-screen-orientation git commit: ignore node_modules

Posted by pu...@apache.org.
ignore node_modules


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/0d18615f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/0d18615f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/0d18615f

Branch: refs/heads/master
Commit: 0d18615f800d608bc089a9b09f75814600329e84
Parents: 622cd2f
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Dec 13 15:41:04 2016 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Dec 13 15:41:04 2016 -0800

----------------------------------------------------------------------
 .gitignore | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/0d18615f/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 6df9abc..b847a2b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,7 +15,7 @@ Thumbs.db
 demo/hooks/
 demo/platforms/
 demo/plugins/
-
+/node_modules/
 .vscode/
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[13/16] cordova-plugin-screen-orientation git commit: cleaned up js, fixed whitespace

Posted by pu...@apache.org.
cleaned up js, fixed whitespace


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/216b99f4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/216b99f4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/216b99f4

Branch: refs/heads/master
Commit: 216b99f432feaf2a9b278f72d8730bca292661da
Parents: b7e5477
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Dec 13 15:39:58 2016 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Dec 13 15:39:58 2016 -0800

----------------------------------------------------------------------
 www/screenorientation.js | 186 +++++++++++++++++++-----------------------
 1 file changed, 86 insertions(+), 100 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/216b99f4/www/screenorientation.js
----------------------------------------------------------------------
diff --git a/www/screenorientation.js b/www/screenorientation.js
index d574faa..d24a48c 100644
--- a/www/screenorientation.js
+++ b/www/screenorientation.js
@@ -1,4 +1,3 @@
-cordova.define("cordova-plugin-screen-orientation.screenorientation", function(require, exports, module) {
 /*
  *
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,115 +19,102 @@ cordova.define("cordova-plugin-screen-orientation.screenorientation", function(r
  *
  */
 
-               var screenOrientation = {},
-               Orientations = [
-                               'portrait-primary',
-                               // The orientation is in the primary portrait mode.
-                               'portrait-secondary',
-                               // The orientation is in the secondary portrait mode.
-                               'landscape-primary',
-                               // The orientation is in the primary landscape mode.
-                               'landscape-secondary',
-                               // The orientation is in the secondary landscape mode.
-                               'portrait',
-                               // The orientation is either portrait-primary or portrait-secondary.
-                               'landscape',
-                               // The orientation is either landscape-primary or landscape-secondary.
-                               'any'
-                               // All orientations are supported (unlocked orientation)
-                               ];
+var screenOrientation = {},
+    Orientations = [
+        'portrait-primary',
+        'portrait-secondary',
+        'landscape-primary',
+        'landscape-secondary',
+        'portrait',  // either portrait-primary or portrait-secondary.
+        'landscape', // either landscape-primary or landscape-secondary.
+        'any'        // All orientations are supported (unlocked orientation)
+    ];
 
-               screenOrientation.Orientations = Orientations;
-               screenOrientation.currOrientation = 'any';
-               var orientationMask = 0;
-               screenOrientation.setOrientation = function(orientation) {
-               if(orientation == Orientations[0]){
-               orientationMask = 1;
-               }
-               else if(orientation == Orientations[1]){
-               orientationMask = 2;
-               }
-               else if(orientation == Orientations[2]){
-               orientationMask = 4;
-               }
-               else if(orientation == Orientations[3]){
-               orientationMask = 8;
-               }
-               else if(orientation == Orientations[4]){
-               orientationMask = 3;
-               }
-               else if(orientation == Orientations[5]){
-               orientationMask = 12;
-               }
-               else if(orientation == Orientations[6]){
-               orientationMask = 15;
-               }
+screenOrientation.Orientations = Orientations;
+screenOrientation.currOrientation = 'any';
+var orientationMask = 0;
+screenOrientation.setOrientation = function(orientation) {
+    if(orientation == Orientations[0]){
+        orientationMask = 1;
+    }
+    else if(orientation == Orientations[1]){
+        orientationMask = 2;
+    }
+    else if(orientation == Orientations[2]){
+        orientationMask = 4;
+    }
+    else if(orientation == Orientations[3]){
+        orientationMask = 8;
+    }
+    else if(orientation == Orientations[4]){
+        orientationMask = 3;
+    }
+    else if(orientation == Orientations[5]){
+        orientationMask = 12;
+    }
+    else if(orientation == Orientations[6]){
+        orientationMask = 15;
+    }
 
 
-               cordova.exec(null, null, "CDVOrientation", "screenOrientation", [orientationMask, orientation]);
-               //console.log('setOrientation not supported on device');
-               };
+    cordova.exec(null, null, "CDVOrientation", "screenOrientation", [orientationMask, orientation]);
+    //console.log('setOrientation not supported on device');
+};
 
-               function addScreenOrientationApi(screenObject) {
-               if (screenObject.unlockOrientation || screenObject.lockOrientation) {
-               return;
-               }
+function addScreenOrientationApi(screenObject) {
+    if (screenObject.unlockOrientation || screenObject.lockOrientation) {
+        return;
+    }
 
-               screenObject.lockOrientation = function(orientation) {
-               
-               var p = new Promise(function(resolve,reject){
-                                   if (Orientations.indexOf(orientation) == -1) {
-                                   var err = new Error();
-                                   err.name = "NotSupportedError";
-                                   
-                                   reject(err);//"cannot change orientation");
-                                   
-                                   }
-                                   else {
-                                screenOrientation.currOrientation = screenObject.orientation = orientation;
-                                screenOrientation.setOrientation(orientation);
-                                   resolve("Orientation set"); // orientation change successful
-                                   }
-                                  });
-               return p;
-               
-              
-               };
+    screenObject.lockOrientation = function(orientation) {
 
-               screenObject.unlockOrientation = function() {
-               screenOrientation.currOrientation = screenObject.orientation = 'any';
-               screenOrientation.setOrientation('any');
-               };
-               }
+        var p = new Promise(function(resolve,reject){
+            if (Orientations.indexOf(orientation) == -1) {
+                var err = new Error();
+                err.name = "NotSupportedError";
+                reject(err);//"cannot change orientation");
+            }
+            else {
+                screenOrientation.currOrientation = screenObject.orientation = orientation;
+                screenOrientation.setOrientation(orientation);
+                resolve("Orientation set"); // orientation change successful
+            }
+        });
+        return p;
+    };
 
-               addScreenOrientationApi(screen);
-               orientationChange();
+    screenObject.unlockOrientation = function() {
+        screenOrientation.currOrientation = screenObject.orientation = 'any';
+        screenOrientation.setOrientation('any');
+    };
+}
 
-               function orientationChange() {
-               var orientation;
+addScreenOrientationApi(screen);
+orientationChange();
 
-               switch (window.orientation) {
-               case 0:
-               orientation = 'portrait-primary';
-               break;
-               case 90:
-               orientation = 'landscape-primary';
-               break;
-               case 180:
-               orientation = 'portrait-secondary';
-               break;
-               case -90:
-               orientation = 'landscape-secondary';
-               break;
-               default:
-               orientation = 'any';
-               }
+function orientationChange() {
+    var orientation;
 
-               screen.orientation = orientation;
-               }
+    switch (window.orientation) {
+        case 0:
+            orientation = 'portrait-primary';
+            break;
+        case 90:
+            orientation = 'landscape-primary';
+            break;
+        case 180:
+            orientation = 'portrait-secondary';
+            break;
+        case -90:
+            orientation = 'landscape-secondary';
+            break;
+        default:
+        orientation = 'any';
+    }
 
-               window.addEventListener("orientationchange", orientationChange, true);
+    screen.orientation = orientation;
+}
 
-               module.exports = screenOrientation;
+window.addEventListener("orientationchange", orientationChange, true);
 
-});
+module.exports = screenOrientation;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[11/16] cordova-plugin-screen-orientation git commit: Resolve merge conflicts

Posted by pu...@apache.org.
Resolve merge conflicts


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/ab234054
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/ab234054
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/ab234054

Branch: refs/heads/master
Commit: ab23405417ba8ae6451d69e16584182232a2f28c
Parents: 9f477a5 f2f2dbd
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Mon Dec 12 11:23:29 2016 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Mon Dec 12 11:23:29 2016 -0800

----------------------------------------------------------------------
 .gitignore                                      |  29 ++++
 .npmignore                                      |   2 +
 README.md                                       |  42 ++---
 demo/config.xml                                 |  26 +++
 demo/www/css/index.css                          | 115 +++++++++++++
 demo/www/img/logo.png                           | Bin 0 -> 21814 bytes
 demo/www/index.html                             |  58 +++++++
 demo/www/js/index.js                            |  96 +++++++++++
 package.json                                    |   2 +-
 plugin.xml                                      |  74 ++++-----
 src/android/CDVOrientation.java                 |  97 +++++++++++
 src/android/YoikScreenOrientation.java          | 101 -----------
 src/ios/CDVOrientation.h                        |  31 ++++
 src/ios/CDVOrientation.m                        |  65 ++++++++
 ...ViewController+UpdateSupportedOrientations.h |  28 ----
 ...ViewController+UpdateSupportedOrientations.m |  32 ----
 src/ios/YoikScreenOrientation.h                 |  36 ----
 src/ios/YoikScreenOrientation.m                 | 120 --------------
 src/windows/CDVOrientation.cs                   |  58 +++++++
 src/wp/YoikScreenOrientation.cs                 | 140 ----------------
 tests/plugin.xml                                |  31 ++++
 tests/tests.js                                  |  36 ++++
 www/screenorientation.android.js                |  29 ----
 www/screenorientation.ios.js                    |  56 -------
 www/screenorientation.js                        | 166 ++++++++++++-------
 www/screenorientation.windows.js                |  54 ------
 www/screenorientation.wp8.js                    |  29 ----
 27 files changed, 791 insertions(+), 762 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/ab234054/README.md
----------------------------------------------------------------------
diff --cc README.md
index 58d2918,a632e6f..fe022b0
--- a/README.md
+++ b/README.md
@@@ -123,17 -99,13 +99,27 @@@ The __screen.orientation__ property wil
  
  Wraps the com.blackberry.app plugin functions, auto installed as a dependancy.
  
++<<<<<<< HEAD
 +## WP8 Notes
 +
 +Windows phone does not support specification or primary and secondary orientations.  If called with a specific orientation the plugin will just apply the landscape or portait orientation.
 +
 +## W8.1 Notes
 +
 +Windows 8.1 Applicaitons (runtime/metro applications) will only display orientation changes if the device has some sort of accelerometer.  The internal state of the "orientation" will still be kept, but the actual screen won't rotate unless the device supports it.
 +
 +# Legacy Changelog
 +
 +See [RELEASENOTES.md](RELEASENOTES.md) for the automated changelog.
++=======
+ # Changelog
+ 
+ ## 2.0.0
+ * Common javascript for iOS, Android and Windows.
+ 
+ ## 1.4.2
+ * [#101](https://github.com/gbenvenuti/cordova-plugin-screen-orientation/pull/101) make iOS rotate as needed when lockOrientation is called
++>>>>>>> f2f2dbde729b9d3ac5884de6ee80ae354a3bf5ef
  
  ## 1.4.1
  * [#89](https://github.com/gbenvenuti/cordova-plugin-screen-orientation/pull/89) Fix for cordova >= 3.6.3

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/ab234054/plugin.xml
----------------------------------------------------------------------
diff --cc plugin.xml
index c4aa0f9,b777d6f..9ecc897
--- a/plugin.xml
+++ b/plugin.xml
@@@ -18,8 -18,8 +18,7 @@@
  
  <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
      id="cordova-plugin-screen-orientation"
-     version="1.4.3-dev">
- 
+     version="2.0.0-dev">
 -    
      <name>Screen Orientation</name>
      <description>Adds Screen Orientation API lock and unlock functions to the global screen object in android, iOS, WP8, W8.1, and BB10.</description>
      <license>MIT</license>
@@@ -31,35 -31,30 +30,30 @@@
      <js-module src="www/screenorientation.js" name="screenorientation">
          <clobbers target="cordova.plugins.screenorientation" />
      </js-module>
 -    
 +
      <platform name="ios">
          <config-file target="config.xml" parent="/*">
-             <feature name="YoikScreenOrientation">
-                 <param name="ios-package" value="YoikScreenOrientation" />
+             <feature name="CDVOrientation">
+                 <param name="ios-package" value="CDVOrientation" />
              </feature>
          </config-file>
-         <js-module src="www/screenorientation.ios.js" name="screenorientation.ios">
-             <merges target="cordova.plugins.screenorientation" />
-         </js-module>
-         <header-file src="src/ios/YoikScreenOrientation.h" />
-         <source-file src="src/ios/YoikScreenOrientation.m" />
-         <header-file src="src/ios/CDVViewController+UpdateSupportedOrientations.h" />
-         <source-file src="src/ios/CDVViewController+UpdateSupportedOrientations.m" />
 -        
++
+         <header-file src="src/ios/CDVOrientation.h" />
+         <source-file src="src/ios/CDVOrientation.m" />
 -        
++
      </platform>
 -    
 +
      <platform name="android">
-         <source-file src="src/android/YoikScreenOrientation.java" target-dir="src/net/yoik/cordova/plugins/screenorientation/" />
+         <source-file src="src/android/CDVOrientation.java" target-dir="src/cordova/plugins/screenorientation/" />
 -        
 +
          <config-file target="res/xml/config.xml" parent="/*">
-             <feature name="YoikScreenOrientation">
-                 <param name="android-package" value="net.yoik.cordova.plugins.screenorientation.YoikScreenOrientation" />
+             <feature name="CDVOrientation">
+                 <param name="android-package" value="cordova.plugins.screenorientation.CDVOrientation" />
              </feature>
          </config-file>
-         <js-module src="www/screenorientation.android.js" name="screenorientation.android">
-             <merges target="cordova.plugins.screenorientation" />
-         </js-module>
 -        
++
      </platform>
 -    
 +
      <platform name="blackberry10">
          <dependency id="com.blackberry.app" />
          <config-file target="www/config.xml" parent="/widget">
@@@ -69,23 -64,13 +63,13 @@@
              <merges target="cordova.plugins.screenorientation" />
          </js-module>
      </platform>
 -    
 -    
 -    
 +
-     <platform name="wp8">
-         <config-file target="config.xml" parent="/*">
-             <feature name="YoikScreenOrientation">
-                 <param name="wp-package" value="YoikScreenOrientation"/>
-             </feature>
-         </config-file>
-         <js-module src="www/screenorientation.wp8.js" name="screenorientation.wp8">
-             <merges target="cordova.plugins.screenorientation" />
-         </js-module>
-         <source-file src="src/wp/YoikScreenOrientation.cs" />
-     </platform>
++
 +
      <platform name="windows">
-         <js-module src="www/screenorientation.windows.js" name="screenorientation.windows">
-             <merges target="cordova.plugins.screenorientation" />
+         <js-module src="src/windows/CDVOrientationProxy.js" name="CDVOrientationProxy">
+             <merges target="" />
          </js-module>
      </platform>
 -    
 +
  </plugin>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[05/16] cordova-plugin-screen-orientation git commit: basic tests added

Posted by pu...@apache.org.
 basic tests added


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/f881c95e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/f881c95e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/f881c95e

Branch: refs/heads/master
Commit: f881c95e9a580d9bccf7ee531291afb0b1b4cac9
Parents: c00a7c4
Author: maverickmishra <vi...@gmail.com>
Authored: Tue Aug 30 17:12:46 2016 -0700
Committer: maverickmishra <vi...@gmail.com>
Committed: Tue Aug 30 17:12:46 2016 -0700

----------------------------------------------------------------------
 tests/plugin.xml | 31 +++++++++++++++++++++++++++++++
 tests/tests.js   | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/f881c95e/tests/plugin.xml
----------------------------------------------------------------------
diff --git a/tests/plugin.xml b/tests/plugin.xml
new file mode 100644
index 0000000..5d01bad
--- /dev/null
+++ b/tests/plugin.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
+    xmlns:rim="http://www.blackberry.com/ns/widgets"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="cordova-plugin-device-tests"
+    version="1.0.0-dev">
+    <name>Cordova Screen Orientation Plugin Tests</name>
+    <license>Apache 2.0</license>
+
+    <js-module src="tests.js" name="tests">
+    </js-module>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/f881c95e/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
new file mode 100644
index 0000000..7a28ff5
--- /dev/null
+++ b/tests/tests.js
@@ -0,0 +1,36 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+/* jshint jasmine: true */
+
+exports.defineAutoTests = function() {
+  describe('Orientation Information (window.orientation)', function () {
+    it("should exist", function() {
+      expect(window.orientation).toBeDefined();
+    });
+
+    it("should contain a platform specification that is a string", function() {
+      expect(window.orientation).toBeDefined();
+      expect((String(window.orientation.type)).length > 0).toBe(true);
+    });
+
+  });
+};


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[14/16] cordova-plugin-screen-orientation git commit: added npm test, and jshinting

Posted by pu...@apache.org.
added npm test, and jshinting


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/622cd2f2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/622cd2f2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/622cd2f2

Branch: refs/heads/master
Commit: 622cd2f2d4cbc24bd7179419f1a2d4ef47e098b1
Parents: 216b99f
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Dec 13 15:40:21 2016 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Dec 13 15:40:21 2016 -0800

----------------------------------------------------------------------
 package.json | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/622cd2f2/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index b440fa4..f931c95 100644
--- a/package.json
+++ b/package.json
@@ -6,6 +6,10 @@
     "type": "git",
     "url": "git+https://github.com/gbenvenuti/cordova-plugin-screen-orientation.git"
   },
+  "scripts": {
+    "test": "npm run jshint",
+    "jshint": "node node_modules/jshint/bin/jshint www && node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint demo/www"
+  },
   "cordova": {
     "id": "cordova-plugin-screen-orientation",
     "platforms": [
@@ -28,5 +32,8 @@
   "bugs": {
     "url": "https://github.com/gbenvenuti/cordova-plugin-screen-orientation/issues"
   },
-  "homepage": "https://github.com/gbenvenuti/cordova-plugin-screen-orientation#readme"
+  "homepage": "https://github.com/gbenvenuti/cordova-plugin-screen-orientation#readme",
+  "devDependencies": {
+    "jshint": "^2.9.4"
+  }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[06/16] cordova-plugin-screen-orientation git commit: Added promises to plugin

Posted by pu...@apache.org.
 Added promises to plugin


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/90f5f253
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/90f5f253
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/90f5f253

Branch: refs/heads/master
Commit: 90f5f2531a6a354d8e8b889e707099b214d9e09d
Parents: f881c95
Author: maverickmishra <vi...@gmail.com>
Authored: Tue Sep 20 10:36:36 2016 -0700
Committer: maverickmishra <vi...@gmail.com>
Committed: Tue Sep 20 10:36:36 2016 -0700

----------------------------------------------------------------------
 www/screenorientation.js | 32 ++++++++++++++++++++++++++------
 1 file changed, 26 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/90f5f253/www/screenorientation.js
----------------------------------------------------------------------
diff --git a/www/screenorientation.js b/www/screenorientation.js
index 77f1f9f..8aaa51f 100644
--- a/www/screenorientation.js
+++ b/www/screenorientation.js
@@ -1,3 +1,4 @@
+cordova.define("cordova-plugin-screen-orientation.screenorientation", function(require, exports, module) {
 /*
  *
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -72,12 +73,29 @@
                }
 
                screenObject.lockOrientation = function(orientation) {
-               if (Orientations.indexOf(orientation) == -1) {
-               console.log('INVALID ORIENTATION', orientation);
-               return;
-               }
-               screenOrientation.currOrientation = screenObject.orientation = orientation;
-               screenOrientation.setOrientation(orientation);
+
+               var p = new Promise(function(resolve,reject){
+                                   if (Orientations.indexOf(orientation) == -1) {
+                                   //   console.log('INVALID ORIENTATION', orientation);
+                                   var err = new Error();
+                                   err.name = "NotSupportedError";
+
+                                   reject(err);//"cannot change orientation");
+
+                                   }
+                                   else {
+                                screenOrientation.currOrientation = screenObject.orientation = orientation;
+                                screenOrientation.setOrientation(orientation);
+                                   resolve("Orientation changed"); // orientation change successful
+                                   }
+
+
+
+
+                                   });
+               return p;
+
+
                };
 
                screenObject.unlockOrientation = function() {
@@ -115,3 +133,5 @@
                window.addEventListener("orientationchange", orientationChange, true);
 
                module.exports = screenOrientation;
+
+});


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[12/16] cordova-plugin-screen-orientation git commit: Fix mismatched license fields

Posted by pu...@apache.org.
Fix mismatched license fields


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/b7e54779
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/b7e54779
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/b7e54779

Branch: refs/heads/master
Commit: b7e547794d231c5bc5e4b678332dd7faf96f2cda
Parents: ab23405
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Mon Dec 12 18:20:42 2016 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Mon Dec 12 18:20:42 2016 -0800

----------------------------------------------------------------------
 plugin.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/b7e54779/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 9ecc897..338ce13 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -21,7 +21,7 @@
     version="2.0.0-dev">
     <name>Screen Orientation</name>
     <description>Adds Screen Orientation API lock and unlock functions to the global screen object in android, iOS, WP8, W8.1, and BB10.</description>
-    <license>MIT</license>
+    <license>Apache 2.0</license>
 
     <engines>
         <engine name="cordova" version=">=3.0.0" />


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org