|
1
|
-package com.vodeapp.customsIcon;
|
1
|
+package com.customIcon;
|
|
2
|
|
2
|
|
|
3
|
import android.app.Activity;
|
3
|
import android.app.Activity;
|
|
4
|
import android.content.ComponentName;
|
4
|
import android.content.ComponentName;
|
|
@@ -9,10 +9,10 @@ import com.facebook.react.bridge.ReactApplicationContext; |
|
@@ -9,10 +9,10 @@ import com.facebook.react.bridge.ReactApplicationContext; |
|
9
|
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
9
|
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
10
|
import com.facebook.react.bridge.ReactMethod;
|
10
|
import com.facebook.react.bridge.ReactMethod;
|
|
11
|
|
11
|
|
|
12
|
-public class CustomsIconModule extends ReactContextBaseJavaModule {
|
12
|
+public class CustomIconModule extends ReactContextBaseJavaModule {
|
|
13
|
private final ReactApplicationContext reactContext;
|
13
|
private final ReactApplicationContext reactContext;
|
|
14
|
|
14
|
|
|
15
|
- public CustomsIconModule(ReactApplicationContext reactContext) {
|
15
|
+ public CustomIconModule(ReactApplicationContext reactContext) {
|
|
16
|
super(reactContext);
|
16
|
super(reactContext);
|
|
17
|
this.reactContext = reactContext;
|
17
|
this.reactContext = reactContext;
|
|
18
|
}
|
18
|
}
|
|
@@ -28,12 +28,13 @@ public class CustomsIconModule extends ReactContextBaseJavaModule { |
|
@@ -28,12 +28,13 @@ public class CustomsIconModule extends ReactContextBaseJavaModule { |
|
28
|
PackageManager packageManager = this.reactContext.getPackageManager();
|
28
|
PackageManager packageManager = this.reactContext.getPackageManager();
|
|
29
|
Activity activity = getActivity();
|
29
|
Activity activity = getActivity();
|
|
30
|
ComponentName am =activity.getComponentName();
|
30
|
ComponentName am =activity.getComponentName();
|
|
31
|
- packageManager.setComponentEnabledSetting(new ComponentName(this.reactContext, pageName +
|
|
|
|
32
|
- am.getShortClassName()), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager
|
31
|
+ // if(am.getShortClassName()==""){
|
|
|
|
32
|
+
|
|
|
|
33
|
+ // }
|
|
|
|
34
|
+ packageManager.setComponentEnabledSetting(am, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager
|
|
33
|
.DONT_KILL_APP);
|
35
|
.DONT_KILL_APP);
|
|
34
|
packageManager.setComponentEnabledSetting(new ComponentName(this.reactContext,pageName +
|
36
|
packageManager.setComponentEnabledSetting(new ComponentName(this.reactContext,pageName +
|
|
35
|
- "."+name), PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager
|
|
|
|
36
|
- .DONT_KILL_APP);
|
37
|
+ "."+name), PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0);
|
|
37
|
}
|
38
|
}
|
|
38
|
public Activity getActivity() {
|
39
|
public Activity getActivity() {
|
|
39
|
return this.getCurrentActivity();
|
40
|
return this.getCurrentActivity();
|