Skip to content

Commit

Permalink
fix todos
Browse files Browse the repository at this point in the history
  • Loading branch information
MikhailSuendukov committed Dec 7, 2023
1 parent 9d34f3e commit bcc8385
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,11 @@ static void startAppCenter(Application application, String startTypeString) {
AppCenter.setCountryCode(countryCode);
}

// TODO: uncomment this code after release sdk to maven
// /* Set data residency region. */
// String dataResidencyRegion = MainActivity.sSharedPreferences.getString(application.getString(R.string.data_residency_region_key), null);
// if (dataResidencyRegion != null) {
// AppCenter.setDataResidencyRegion(dataResidencyRegion);
// }
/* Set data residency region. */
String dataResidencyRegion = MainActivity.sSharedPreferences.getString(application.getString(R.string.data_residency_region_key), null);
if (dataResidencyRegion != null) {
AppCenter.setDataResidencyRegion(dataResidencyRegion);
}

/* Set the track explicitly only if we set it in settings, to test the initial public by default at first launch. */
int savedTrack = sSharedPreferences.getInt(application.getString(R.string.appcenter_distribute_track_state_key), 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ public void onClick(DialogInterface dialog, int which) {
.putString(getActivity().getString(R.string.data_residency_region_key), input.getText().toString())
.apply();
preference.setSummary(input.getText());
AppCenter.setDataResidencyRegion(input.getText().toString());
Toast.makeText(getActivity(), getActivity().getString(R.string.data_residency_region_save_message), Toast.LENGTH_SHORT).show();
}
})
Expand Down
2 changes: 1 addition & 1 deletion apps/sasquatch/src/main/res/values/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<string name="data_residency_region_key" tools:ignore="MissingTranslation">data_residency_region</string>
<string name="data_residency_region_title" tools:ignore="MissingTranslation">Data residency region</string>
<string name="data_residency_region_save_message" tools:ignore="MissingTranslation">Data residency region value will be applied after the application restart.</string>
<string name="data_residency_region_save_message" tools:ignore="MissingTranslation">Data residency region value applied.</string>

<string name="storage_file_size_key" tools:ignore="MissingTranslation">storage_file_size_key</string>
<string name="storage_file_size_title" tools:ignore="MissingTranslation">Storage File Size</string>
Expand Down

0 comments on commit bcc8385

Please sign in to comment.