File tree Expand file tree Collapse file tree
app/src/main/java/org/schabi/newpipe/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -437,11 +437,13 @@ private static String getQuantity(@NonNull final Context context,
437437 return context .getResources ().getQuantityString (pluralId , safeCount , formattedCount );
438438 }
439439
440+ // Starting with pull request #12093, NewPipe exclusively uses Android's
441+ // public per-app language APIs to read and set the UI language for NewPipe.
442+ // The following code will migrate any existing custom app language in SharedPreferences to
443+ // use the public per-app language APIs instead.
444+ // For reference, see
445+ // https://android-developers.googleblog.com/2022/11/per-app-language-preferences-part-1.html
440446 public static void migrateAppLanguageSettingIfNecessary (@ NonNull final Context context ) {
441- // Starting with pull request #12093, NewPipe exclusively uses Android's
442- // public per-app language APIs to read and set the UI language for NewPipe.
443- // The following code will migrate any existing custom app language in SharedPreferences to
444- // use the public per-app language APIs instead.
445447 final SharedPreferences sp = PreferenceManager .getDefaultSharedPreferences (context );
446448 final String appLanguageKey = context .getString (R .string .app_language_key );
447449 final String appLanguageValue = sp .getString (appLanguageKey , null );
You can’t perform that action at this time.
0 commit comments