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

Commit 1fc9f46e authored by BK Choi's avatar BK Choi Committed by Android (Google) Code Review
Browse files

Merge "Set the correct platform type in AudioSystem#getPlatformType()." into main

parents 286efffd d68c74c6
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -2499,14 +2499,12 @@ public class AudioSystem
     * </ul>
     */
    public static int getPlatformType(Context context) {
        if (((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE))
                .isVoiceCapable()) {
        if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)) {
            return PLATFORM_AUTOMOTIVE;
        } else if ((context.getSystemService(TelephonyManager.class)).isVoiceCapable()) {
            return PLATFORM_VOICE;
        } else if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_LEANBACK)) {
            return PLATFORM_TELEVISION;
        } else if (context.getPackageManager().hasSystemFeature(
                PackageManager.FEATURE_AUTOMOTIVE)) {
            return PLATFORM_AUTOMOTIVE;
        } else {
            return PLATFORM_DEFAULT;
        }