Skip to content
This repository

Pull Req: Replace DIRECTION_PORTRAIT to DIRECTION_NORTH #47

Merged
merged 1 commit into from about 2 years ago

5 participants

Sergey Golod James Choi Eric Ho Chris DelCol Daniel Mateescu
Sergey Golod

ID: Bug #93 - Bug: rim:orientation causing apps to orient sideways
Some phones like 9930 shows DIRECTION_PORTRAIT as traditional landscape because of their width is larger than height, the change would prevent that and show as a standard portrait mode.

James Choi

Code review complete.

Eric Ho

SV&V completed tests on feature build.
The test app is locked to Portrait, and compiled by feature build.
In 7.0.0.343 (bug poster’s 7.0 bundle) 9930, app is rendered sideways. The same app in 7.1.889 is rendered correctly.

So the fix doesn’t solve the problem in older 7.0 bundles.

Eric Ho

SV&V has retested feature build, and all tests passed. Previous test results were inaccurate due to tester error.
SV&V approved.

Chris DelCol

The demo looks good. Product approved.

Daniel Mateescu dmateescu merged commit 93368b7 into from February 09, 2012
Daniel Mateescu dmateescu closed this February 09, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Feb 07, 2012
Replace DIRECTION_PORTRAIT to DIRECTION_NORTH since some phones shows…
… the first as native landscape
894ee8d
This page is out of date. Refresh to see the latest.
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();
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.