This repository was archived by the owner on May 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
android/app/src/main/java/com/microsoft/codepush/react Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -113,17 +113,15 @@ - (instancetype)init
113
113
self = [super init ];
114
114
115
115
if (self) {
116
- // Do an async check to see whether
117
- // we need to start the rollback timer
116
+ // Do a check to see whether we need to start the rollback timer
118
117
// due to a pending update being installed at start
119
- [self handleInitIfPendingUpdate ];
118
+ [self initializeUpdateAfterRestart ];
120
119
}
121
120
122
121
return self;
123
122
}
124
123
125
-
126
- - (void )handleInitIfPendingUpdate
124
+ - (void )initializeUpdateAfterRestart
127
125
{
128
126
NSUserDefaults *preferences = [NSUserDefaults standardUserDefaults ];
129
127
NSDictionary *pendingUpdate = [preferences objectForKey: PendingUpdateKey];
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ public CodePush(String deploymentKey, Activity mainActivity) {
87
87
throw new CodePushUnknownException ("Unable to get package info for " + applicationContext .getPackageName (), e );
88
88
}
89
89
90
- handleInitIfPendingUpdate ();
90
+ initializeUpdateAfterRestart ();
91
91
}
92
92
93
93
public ReactPackage getReactPackage () {
@@ -231,7 +231,7 @@ public void run() {
231
231
}, timeout );
232
232
}
233
233
234
- private void handleInitIfPendingUpdate () {
234
+ private void initializeUpdateAfterRestart () {
235
235
SharedPreferences settings = applicationContext .getSharedPreferences (CODE_PUSH_PREFERENCES , 0 );
236
236
String pendingUpdateString = settings .getString (PENDING_UPDATE_KEY , null );
237
237
You can’t perform that action at this time.
0 commit comments