mirror of
https://github.com/status-im/react-native.git
synced 2025-02-05 14:13:26 +00:00
Fix BadtokenException thrown when opening Android Catalyst app
Reviewed By: achen1 Differential Revision: D7676053 fbshipit-source-id: e0cf9541de131b7c21de9a2647e4270f78b0a107
This commit is contained in:
parent
4fcd9970bd
commit
49655c6eb3
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
package com.facebook.react.devsupport;
|
package com.facebook.react.devsupport;
|
||||||
|
|
||||||
|
import android.annotation.TargetApi;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
@ -33,6 +34,7 @@ import javax.annotation.Nullable;
|
|||||||
/**
|
/**
|
||||||
* Controller to display loading messages on top of the screen. All methods are thread safe.
|
* Controller to display loading messages on top of the screen. All methods are thread safe.
|
||||||
*/
|
*/
|
||||||
|
@TargetApi(Build.VERSION_CODES.CUPCAKE)
|
||||||
public class DevLoadingViewController {
|
public class DevLoadingViewController {
|
||||||
private static final int COLOR_DARK_GREEN = Color.parseColor("#035900");
|
private static final int COLOR_DARK_GREEN = Color.parseColor("#035900");
|
||||||
|
|
||||||
@ -158,18 +160,16 @@ public class DevLoadingViewController {
|
|||||||
topOffset = rectangle.top;
|
topOffset = rectangle.top;
|
||||||
}
|
}
|
||||||
|
|
||||||
mDevLoadingPopup = new PopupWindow(
|
mDevLoadingPopup = new PopupWindow(currentActivity);
|
||||||
mDevLoadingView,
|
|
||||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
|
||||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
|
||||||
mDevLoadingPopup.setTouchable(false);
|
mDevLoadingPopup.setTouchable(false);
|
||||||
|
mDevLoadingPopup.setWidth(ViewGroup.LayoutParams.MATCH_PARENT);
|
||||||
|
mDevLoadingPopup.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||||
|
|
||||||
mDevLoadingPopup.showAtLocation(
|
mDevLoadingPopup.showAtLocation(
|
||||||
currentActivity.getWindow().getDecorView(),
|
currentActivity.getWindow().getDecorView(),
|
||||||
Gravity.NO_GRAVITY,
|
Gravity.NO_GRAVITY,
|
||||||
|
0,
|
||||||
0,
|
topOffset);
|
||||||
topOffset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void hideInternal() {
|
private void hideInternal() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user