Browse Source

fix(android): Blank screen due to missing super() call in RNCWebViewManager.java (#241)

fixes #240 #224
Thibault Malbranche 5 years ago
parent
commit
4e1d113c70
No account linked to committer's email address

+ 5
- 3
android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java View File

272
 
272
 
273
     @Override
273
     @Override
274
     protected void onSizeChanged(int w, int h, int ow, int oh) {
274
     protected void onSizeChanged(int w, int h, int ow, int oh) {
275
+      super.onSizeChanged(w, h, ow, oh);
276
+
275
       if (sendContentSizeChangeEvents) {
277
       if (sendContentSizeChangeEvents) {
276
         dispatchEvent(
278
         dispatchEvent(
277
           this,
279
           this,
492
 
494
 
493
         //Attempt to add cookie, if it exists
495
         //Attempt to add cookie, if it exists
494
         URL urlObj = null;
496
         URL urlObj = null;
495
-        try {  
497
+        try {
496
           urlObj = new URL(url);
498
           urlObj = new URL(url);
497
           String baseUrl = urlObj.getProtocol() + "://" + urlObj.getHost();
499
           String baseUrl = urlObj.getProtocol() + "://" + urlObj.getHost();
498
-          String cookie = CookieManager.getInstance().getCookie(baseUrl);  
500
+          String cookie = CookieManager.getInstance().getCookie(baseUrl);
499
           request.addRequestHeader("Cookie", cookie);
501
           request.addRequestHeader("Cookie", cookie);
500
           System.out.println("Got cookie for DownloadManager: " + cookie);
502
           System.out.println("Got cookie for DownloadManager: " + cookie);
501
         } catch (MalformedURLException e) {
503
         } catch (MalformedURLException e) {
502
           System.out.println("Error getting cookie for DownloadManager: " + e.toString());
504
           System.out.println("Error getting cookie for DownloadManager: " + e.toString());
503
-          e.printStackTrace();  
505
+          e.printStackTrace();
504
         }
506
         }
505
 
507
 
506
         //Finish setting up request
508
         //Finish setting up request