Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d592c59 authored by dujin.cha's avatar dujin.cha Committed by Android Git Automerger
Browse files

am eabde3d4: am fe464a76: [Prime K] Fix gabage character issue

* commit 'eabde3d4':
  [Prime K] Fix gabage character issue
parents 63899f78 eabde3d4
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.view.WindowManager;

import java.io.File;
import java.util.HashMap;
import java.util.Locale;

/**
 * {@hide}
@@ -120,6 +121,20 @@ public class MtpDatabase {
        mMediaStoragePath = storagePath;
        mObjectsUri = Files.getMtpObjectsUri(volumeName);
        mMediaScanner = new MediaScanner(context);

        // Set locale to MediaScanner.
        Locale locale = context.getResources().getConfiguration().locale;
        if (locale != null) {
            String language = locale.getLanguage();
            String country = locale.getCountry();
            if (language != null) {
                if (country != null) {
                    mMediaScanner.setLocale(language + "_" + country);
                } else {
                    mMediaScanner.setLocale(language);
                }
            }
        }
        initDeviceProperties(context);
    }