@@ -57,7 +57,7 @@ public async void downloadUpdate(JObject updatePackage, bool notifyProgress, IPr
5757 {
5858 try
5959 {
60- updatePackage [ CodePushConstants . BinaryModifiedTimeKey ] = "" + await _codePush . GetBinaryResourcesModifiedTimeAsync ( ) ;
60+ updatePackage [ CodePushConstants . BinaryModifiedTimeKey ] = "" + await _codePush . GetBinaryResourcesModifiedTimeAsync ( ) . ConfigureAwait ( false ) ;
6161 await _codePush . UpdateManager . DownloadPackageAsync (
6262 updatePackage ,
6363 _codePush . AssetsBundleFileName ,
@@ -80,9 +80,9 @@ await _codePush.UpdateManager.DownloadPackageAsync(
8080 . emit ( CodePushConstants . DownloadProgressEventName , downloadProgress ) ;
8181 }
8282 )
83- ) ;
83+ ) . ConfigureAwait ( false ) ;
8484
85- JObject newPackage = await _codePush . UpdateManager . GetPackageAsync ( ( string ) updatePackage [ CodePushConstants . PackageHashKey ] ) ;
85+ JObject newPackage = await _codePush . UpdateManager . GetPackageAsync ( ( string ) updatePackage [ CodePushConstants . PackageHashKey ] ) . ConfigureAwait ( false ) ;
8686 promise . Resolve ( newPackage ) ;
8787 }
8888 catch ( InvalidDataException e )
@@ -121,7 +121,7 @@ public void getConfiguration(IPromise promise)
121121 [ ReactMethod ]
122122 public async void getUpdateMetadata ( UpdateState updateState , IPromise promise )
123123 {
124- JObject currentPackage = await _codePush . UpdateManager . GetCurrentPackageAsync ( ) ;
124+ JObject currentPackage = await _codePush . UpdateManager . GetCurrentPackageAsync ( ) . ConfigureAwait ( false ) ;
125125 if ( currentPackage == null )
126126 {
127127 promise . Resolve ( "" ) ;
@@ -146,7 +146,7 @@ public async void getUpdateMetadata(UpdateState updateState, IPromise promise)
146146 {
147147 // The caller wants the running update, but the current
148148 // 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 ) ) ;
150150 }
151151 else
152152 {
@@ -179,7 +179,7 @@ public void getNewStatusReport(IPromise promise)
179179 [ ReactMethod ]
180180 public async void installUpdate ( JObject updatePackage , InstallMode installMode , int minimumBackgroundDuration , IPromise promise )
181181 {
182- await _codePush . UpdateManager . InstallPackageAsync ( updatePackage , SettingsManager . IsPendingUpdate ( null ) ) ;
182+ await _codePush . UpdateManager . InstallPackageAsync ( updatePackage , SettingsManager . IsPendingUpdate ( null ) ) . ConfigureAwait ( false ) ;
183183 var pendingHash = ( string ) updatePackage [ CodePushConstants . PackageHashKey ] ;
184184 SettingsManager . SavePendingUpdate ( pendingHash , /* isLoading */ false ) ;
185185 if ( installMode == InstallMode . OnNextResume )
@@ -191,7 +191,7 @@ public async void installUpdate(JObject updatePackage, InstallMode installMode,
191191 {
192192 Context . RunOnNativeModulesQueueThread ( async ( ) =>
193193 {
194- await LoadBundleAsync ( ) ;
194+ await LoadBundleAsync ( ) . ConfigureAwait ( false ) ;
195195 } ) ;
196196 } ;
197197
@@ -219,7 +219,7 @@ public async void isFirstRun(string packageHash, IPromise promise)
219219 bool isFirstRun = _codePush . DidUpdate
220220 && packageHash != null
221221 && packageHash . Length > 0
222- && packageHash . Equals ( await _codePush . UpdateManager . GetCurrentPackageHashAsync ( ) ) ;
222+ && packageHash . Equals ( await _codePush . UpdateManager . GetCurrentPackageHashAsync ( ) . ConfigureAwait ( false ) ) ;
223223 promise . Resolve ( isFirstRun ) ;
224224 }
225225
@@ -237,7 +237,7 @@ public async void restartApp(bool onlyIfUpdateIsPending)
237237 // is current pending update, then reload the app.
238238 if ( ! onlyIfUpdateIsPending || SettingsManager . IsPendingUpdate ( null ) )
239239 {
240- await LoadBundleAsync ( ) ;
240+ await LoadBundleAsync ( ) . ConfigureAwait ( false ) ;
241241 }
242242 }
243243
@@ -254,7 +254,7 @@ internal async Task LoadBundleAsync()
254254
255255 // #2) Update the locally stored JS bundle file path
256256 Type reactInstanceManagerType = typeof ( ReactInstanceManager ) ;
257- string latestJSBundleFile = await _codePush . GetJavaScriptBundleFileAsync ( _codePush . AssetsBundleFileName ) ;
257+ string latestJSBundleFile = await _codePush . GetJavaScriptBundleFileAsync ( _codePush . AssetsBundleFileName ) . ConfigureAwait ( false ) ;
258258 reactInstanceManagerType
259259 . GetField ( "_jsBundleFile" , BindingFlags . NonPublic | BindingFlags . Instance )
260260 . SetValue ( reactInstanceManager , latestJSBundleFile ) ;
0 commit comments