package com.helloworld;

import android.content.res.Configuration;
import android.os.Bundle;

import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;

import expo.modules.ReactActivityDelegateWrapper;

public class MainActivity extends ReactActivity {

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    // Set the theme to AppTheme BEFORE onCreate to support 
    // coloring the background, status bar, and navigation bar.
    // This is required for expo-splash-screen.
    setTheme(R.style.AppTheme);
    super.onCreate(null);
  }

  @Override
  public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);
    getReactInstanceManager().onConfigurationChanged(this, newConfig);
  }

  /**
   * Returns the name of the main component registered from JavaScript.
   * This is used to schedule rendering of the component.
   */
  @Override
  protected String getMainComponentName() {
    return "main";
  }

  @Override
  protected ReactActivityDelegate createReactActivityDelegate() {
    return new ReactActivityDelegateWrapper(
      this,
      new ReactActivityDelegate(this, getMainComponentName()) {
      @Override
      protected ReactRootView createRootView() {
        return new RNGestureHandlerEnabledRootView(MainActivity.this);
      }
    });
  }
}

@@ -22,50 +22,8 @@
 d;%0A%0A
-import android.content.res.Configuration;%0A
 impo
@@ -44,16 +44,16 @@
 Bundle;%0A
+
 %0Aimport 
@@ -353,17 +353,16 @@
 ivity %7B%0A
-%0A
   @Overr
@@ -625,16 +625,16 @@
 Theme);%0A
+
     supe
@@ -660,205 +660,8 @@
  %7D%0A%0A
-  @Override%0A  public void onConfigurationChanged(Configuration newConfig) %7B%0A    super.onConfigurationChanged(newConfig);%0A    getReactInstanceManager().onConfigurationChanged(this, newConfig);%0A  %7D%0A%0A
   /*

Revert "Update onConfigurationChanged for Android (#14929)" (#15059)