[MM-15874] Add native code to support RNN v2 on Android (#2855)

* Remove fix for MM-9233

* MM-15774 Add native code to support RNN v2 on iOS

* Android changes for RNN v2 upgrade

The activity visibility handling of NotificationsLifecycleFacade
is no longer needed in RNN v2. I've moved the lifecycle callbacks
we use for handling managed config into
ManagedActivityLifecycleCallbacks.java and registered them in
MainApplication's onCreate. Also, I've moved and updated the
loading and getting of the managed config into MainApplication

* Update moduleNames and modulePaths

* Use TAG in restrictionsReceiver

* Set launch screen onCreate

* Comment out registerActivityLifecycleCallbacks for now

* Remove setSoftInputMode call as it's handled in the manifest

* Remove clearHostOnActivityDestroy as that fix is no longer needed

* Rename to canLaunchEntry

* Remove replacement of super.onBackPressed()

* Remove react-navigation from packager files
This commit is contained in:
Miguel Alatzar
2019-06-12 12:26:03 -07:00
committed by Elias Nahum
parent 73792d5526
commit cbe0c719ac
16 changed files with 294 additions and 334 deletions

View File

@@ -2,12 +2,14 @@ package com.mattermost.rnbeta;
import android.os.Bundle;
import android.support.annotation.Nullable;
import com.reactnativenavigation.controllers.SplashActivity;
public class MainActivity extends SplashActivity {
import com.reactnativenavigation.NavigationActivity;
public class MainActivity extends NavigationActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.launch_screen);
/**
* Reference: https://stackoverflow.com/questions/7944338/resume-last-activity-when-launcher-icon-is-clicked
@@ -23,9 +25,4 @@ public class MainActivity extends SplashActivity {
return;
}
}
@Override
public int getSplashLayout() {
return R.layout.launch_screen;
}
}