mirror of
				https://gitcode.com/gh_mirrors/re/react-native-pushy.git
				synced 2025-11-04 15:23:11 +08:00 
			
		
		
		
	fix proguard
This commit is contained in:
		@@ -169,17 +169,19 @@ public class UpdateContext {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void markSuccess() {
 | 
			
		||||
        SharedPreferences.Editor editor = sp.edit();
 | 
			
		||||
        editor.putBoolean("firstTimeOk", true);
 | 
			
		||||
        String lastVersion = sp.getString("lastVersion", null);
 | 
			
		||||
        String curVersion = sp.getString("currentVersion", null);
 | 
			
		||||
        if (lastVersion != null && !lastVersion.equals(curVersion)) {
 | 
			
		||||
            editor.remove("lastVersion");
 | 
			
		||||
            editor.remove("hash_" + lastVersion);
 | 
			
		||||
        }
 | 
			
		||||
        editor.apply();
 | 
			
		||||
        if (!BuildConfig.DEBUG) {
 | 
			
		||||
            SharedPreferences.Editor editor = sp.edit();
 | 
			
		||||
            editor.putBoolean("firstTimeOk", true);
 | 
			
		||||
            String lastVersion = sp.getString("lastVersion", null);
 | 
			
		||||
            String curVersion = sp.getString("currentVersion", null);
 | 
			
		||||
            if (lastVersion != null && !lastVersion.equals(curVersion)) {
 | 
			
		||||
                editor.remove("lastVersion");
 | 
			
		||||
                editor.remove("hash_" + lastVersion);
 | 
			
		||||
            }
 | 
			
		||||
            editor.apply();
 | 
			
		||||
 | 
			
		||||
        this.cleanUp();
 | 
			
		||||
            this.cleanUp();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void clearFirstTime() {
 | 
			
		||||
 
 | 
			
		||||
@@ -147,6 +147,10 @@ public class UpdateModuleImpl {
 | 
			
		||||
                        reactHostField.setAccessible(true);
 | 
			
		||||
                        Object reactHost = reactHostField.get(reactDelegate);
 | 
			
		||||
 | 
			
		||||
                        Field devSupport = reactHost.getClass().getDeclaredField("mUseDevSupport");
 | 
			
		||||
                        devSupport.setAccessible(true);
 | 
			
		||||
                        devSupport.set(reactHost, false);
 | 
			
		||||
 | 
			
		||||
                        // Access the mReactHostDelegate field
 | 
			
		||||
                        Field reactHostDelegateField = reactHost.getClass().getDeclaredField("mReactHostDelegate");
 | 
			
		||||
                        reactHostDelegateField.setAccessible(true);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user