Skip to content

Instantly share code, notes, and snippets.

@ncarandini
Created April 29, 2020 11:48
Show Gist options
  • Save ncarandini/c1f48515c7e9af465d4f6730e15b5cb6 to your computer and use it in GitHub Desktop.
Save ncarandini/c1f48515c7e9af465d4f6730e15b5cb6 to your computer and use it in GitHub Desktop.
Google Maps workaround
try
{
var hasFixedGoogleBug154855417 = GetSharedPreferences("google_bug_154855417", global::Android.Content.FileCreationMode.Private);
if (!hasFixedGoogleBug154855417.Contains("fixed"))
{
var corruptedZoomTables = new Java.IO.File(this.ApplicationContext.FilesDir, "ZoomTables.data");
var corruptedSavedClientParameters = new Java.IO.File(this.ApplicationContext.FilesDir, "SavedClientParameters.data.cs");
var corruptedClientParametersData =
new Java.IO.File(
this.ApplicationContext.FilesDir,
"DATA_ServerControlledParametersManager.data."
+ ((global::Android.Content.ContextWrapper)this.ApplicationContext).BaseContext.PackageName);
var corruptedClientParametersDataV1 =
new Java.IO.File(
this.ApplicationContext.FilesDir,
"DATA_ServerControlledParametersManager.data.v1."
+ ((global::Android.Content.ContextWrapper)this.ApplicationContext).BaseContext.PackageName);
corruptedZoomTables.Delete();
corruptedSavedClientParameters.Delete();
corruptedClientParametersData.Delete();
corruptedClientParametersDataV1.Delete();
hasFixedGoogleBug154855417.Edit().PutBoolean("fixed", true).Apply();
}
}
catch (Exception)
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment