Skip to content
This repository
Browse code

Replace DIRECTION_PORTRAIT to DIRECTION_NORTH since some phones shows…

… the first as native landscape
  • Loading branch information...
commit 894ee8dbdb5fc2959182f37bf9d6f6d66641174c 1 parent bd49e27
authored
28  framework/src/blackberry/web/widget/Widget.java
@@ -53,18 +53,18 @@ public Widget( WidgetConfig wConfig, String locationURI ) {
53 53
         initialize();
54 54
         _locationURI = locationURI;
55 55
 
56  
-		// Set our orientation
57  
-		WidgetConfigImpl configImpl = (WidgetConfigImpl) _wConfig;
58  
-		if (configImpl.isOrientationDefined()) {
59  
-			int direction;
60  
-			if (configImpl.getOrientation() == 0) {
61  
-				direction = net.rim.device.api.system.Display.DIRECTION_PORTRAIT;   
62  
-			} else {
63  
-				direction = net.rim.device.api.system.Display.DIRECTION_LANDSCAPE;   
64  
-			}
65  
-			net.rim.device.api.ui.Ui.getUiEngineInstance().setAcceptableDirections(direction);
66  
-		}
67  
-		
  56
+        // Set our orientation
  57
+        WidgetConfigImpl configImpl = (WidgetConfigImpl) _wConfig;
  58
+        if( configImpl.isOrientationDefined() ) {
  59
+            int direction;
  60
+            if( configImpl.getOrientation() == 0 ) {
  61
+                direction = net.rim.device.api.system.Display.DIRECTION_NORTH;
  62
+            } else {
  63
+                direction = net.rim.device.api.system.Display.DIRECTION_LANDSCAPE;
  64
+            }
  65
+            net.rim.device.api.ui.Ui.getUiEngineInstance().setAcceptableDirections( direction );
  66
+        }
  67
+
68 68
         // Create PageManager
69 69
         PageManager pageManager = new PageManager( this, (WidgetConfigImpl) _wConfig );
70 70
 
@@ -143,9 +143,9 @@ public static void main( String[] args ) {
143 143
                 waitForStartupComplete();
144 144
             }
145 145
             Widget widget = makeWidget( args, wConfig );
146  
-            
  146
+
147 147
             widget.enterEventDispatcher();
148  
-			
  148
+
149 149
             MemoryMaid mm = MemoryMaid.getInstance();
150 150
             if( mm != null ) {
151 151
                 mm.stop();

0 notes on commit 894ee8d

Please sign in to comment.
Something went wrong with that request. Please try again.