If user changes locale on device, activity/fragment will be recreated but ViewModel will be retained with data, that might be invalid for new configuration/locale. Because this is sample referenced by official google documentation, it should not be showcasing invalid ViewModel usage.
ViewModel should not be resolving strings from resources as shown in https://github.com/googlesamples/android-architecture/blob/dev-todo-mvvm-live/todoapp/app/src/main/java/com/example/android/architecture/blueprints/todoapp/statistics/StatisticsViewModel.java
If user changes locale on device, activity/fragment will be recreated but ViewModel will be retained with data, that might be invalid for new configuration/locale. Because this is sample referenced by official google documentation, it should not be showcasing invalid ViewModel usage.
ref. https://issuetracker.google.com/u/1/issues/111961971