@@ -57,7 +57,7 @@ public async void downloadUpdate(JObject updatePackage, bool notifyProgress, IPr
57
57
{
58
58
try
59
59
{
60
- updatePackage [ CodePushConstants . BinaryModifiedTimeKey ] = "" + await _codePush . GetBinaryResourcesModifiedTimeAsync ( ) ;
60
+ updatePackage [ CodePushConstants . BinaryModifiedTimeKey ] = "" + await _codePush . GetBinaryResourcesModifiedTimeAsync ( ) . ConfigureAwait ( false ) ;
61
61
await _codePush . UpdateManager . DownloadPackageAsync (
62
62
updatePackage ,
63
63
_codePush . AssetsBundleFileName ,
@@ -80,9 +80,9 @@ await _codePush.UpdateManager.DownloadPackageAsync(
80
80
. emit ( CodePushConstants . DownloadProgressEventName , downloadProgress ) ;
81
81
}
82
82
)
83
- ) ;
83
+ ) . ConfigureAwait ( false ) ;
84
84
85
- JObject newPackage = await _codePush . UpdateManager . GetPackageAsync ( ( string ) updatePackage [ CodePushConstants . PackageHashKey ] ) ;
85
+ JObject newPackage = await _codePush . UpdateManager . GetPackageAsync ( ( string ) updatePackage [ CodePushConstants . PackageHashKey ] ) . ConfigureAwait ( false ) ;
86
86
promise . Resolve ( newPackage ) ;
87
87
}
88
88
catch ( InvalidDataException e )
@@ -121,7 +121,7 @@ public void getConfiguration(IPromise promise)
121
121
[ ReactMethod ]
122
122
public async void getUpdateMetadata ( UpdateState updateState , IPromise promise )
123
123
{
124
- JObject currentPackage = await _codePush . UpdateManager . GetCurrentPackageAsync ( ) ;
124
+ JObject currentPackage = await _codePush . UpdateManager . GetCurrentPackageAsync ( ) . ConfigureAwait ( false ) ;
125
125
if ( currentPackage == null )
126
126
{
127
127
promise . Resolve ( "" ) ;
@@ -146,7 +146,7 @@ public async void getUpdateMetadata(UpdateState updateState, IPromise promise)
146
146
{
147
147
// The caller wants the running update, but the current
148
148
// one is pending, so we need to grab the previous.
149
- promise . Resolve ( await _codePush . UpdateManager . GetPreviousPackageAsync ( ) ) ;
149
+ promise . Resolve ( await _codePush . UpdateManager . GetPreviousPackageAsync ( ) . ConfigureAwait ( false ) ) ;
150
150
}
151
151
else
152
152
{
@@ -179,7 +179,7 @@ public void getNewStatusReport(IPromise promise)
179
179
[ ReactMethod ]
180
180
public async void installUpdate ( JObject updatePackage , InstallMode installMode , int minimumBackgroundDuration , IPromise promise )
181
181
{
182
- await _codePush . UpdateManager . InstallPackageAsync ( updatePackage , SettingsManager . IsPendingUpdate ( null ) ) ;
182
+ await _codePush . UpdateManager . InstallPackageAsync ( updatePackage , SettingsManager . IsPendingUpdate ( null ) ) . ConfigureAwait ( false ) ;
183
183
var pendingHash = ( string ) updatePackage [ CodePushConstants . PackageHashKey ] ;
184
184
SettingsManager . SavePendingUpdate ( pendingHash , /* isLoading */ false ) ;
185
185
if ( installMode == InstallMode . OnNextResume )
@@ -191,7 +191,7 @@ public async void installUpdate(JObject updatePackage, InstallMode installMode,
191
191
{
192
192
Context . RunOnNativeModulesQueueThread ( async ( ) =>
193
193
{
194
- await LoadBundleAsync ( ) ;
194
+ await LoadBundleAsync ( ) . ConfigureAwait ( false ) ;
195
195
} ) ;
196
196
} ;
197
197
@@ -219,7 +219,7 @@ public async void isFirstRun(string packageHash, IPromise promise)
219
219
bool isFirstRun = _codePush . DidUpdate
220
220
&& packageHash != null
221
221
&& packageHash . Length > 0
222
- && packageHash . Equals ( await _codePush . UpdateManager . GetCurrentPackageHashAsync ( ) ) ;
222
+ && packageHash . Equals ( await _codePush . UpdateManager . GetCurrentPackageHashAsync ( ) . ConfigureAwait ( false ) ) ;
223
223
promise . Resolve ( isFirstRun ) ;
224
224
}
225
225
@@ -237,7 +237,7 @@ public async void restartApp(bool onlyIfUpdateIsPending)
237
237
// is current pending update, then reload the app.
238
238
if ( ! onlyIfUpdateIsPending || SettingsManager . IsPendingUpdate ( null ) )
239
239
{
240
- await LoadBundleAsync ( ) ;
240
+ await LoadBundleAsync ( ) . ConfigureAwait ( false ) ;
241
241
}
242
242
}
243
243
@@ -254,7 +254,7 @@ internal async Task LoadBundleAsync()
254
254
255
255
// #2) Update the locally stored JS bundle file path
256
256
Type reactInstanceManagerType = typeof ( ReactInstanceManager ) ;
257
- string latestJSBundleFile = await _codePush . GetJavaScriptBundleFileAsync ( _codePush . AssetsBundleFileName ) ;
257
+ string latestJSBundleFile = await _codePush . GetJavaScriptBundleFileAsync ( _codePush . AssetsBundleFileName ) . ConfigureAwait ( false ) ;
258
258
reactInstanceManagerType
259
259
. GetField ( "_jsBundleFile" , BindingFlags . NonPublic | BindingFlags . Instance )
260
260
. SetValue ( reactInstanceManager , latestJSBundleFile ) ;
0 commit comments