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

Commit 048cfd4a authored by Xin Li's avatar Xin Li
Browse files

Merge 25Q1 (ab/BP1A.250305.020) to aosp-main-future

Bug: 385190204
Merged-In: I1dafd06061ce072093d0f0b3b621d3ffc4a3d8f9
Change-Id: Iba70db4e02d8d349bed8d5f240eaf874aab3e85f
parents a0250469 a1680f11
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -54,13 +54,13 @@
    <string name="no_vm_number_msg" msgid="1339245731058529388">"ಸಿಮ್‌ ಕಾರ್ಡ್‌ನಲ್ಲಿ ಯಾವುದೇ ಧ್ವನಿಮೇಲ್‌ ಸಂಖ್ಯೆಯನ್ನು ಸಂಗ್ರಹಿಸಿಲ್ಲ."</string>
    <string name="add_vm_number_str" msgid="5179510133063168998">"ಸಂಖ್ಯೆಯನ್ನು ಸೇರಿಸಿ"</string>
    <string name="change_default_dialer_dialog_title" msgid="5861469279421508060">"<xliff:g id="NEW_APP">%s</xliff:g> ಅನ್ನು ನಿಮ್ಮ ಡಿಫಾಲ್ಟ್ ಫೋನ್ ಆ್ಯಪ್ ಆಗಿ ಮಾಡಬೇಕೆ?"</string>
    <string name="change_default_dialer_dialog_affirmative" msgid="8604665314757739550">"ಡಿಫಾಲ್ಟ್ ಹೊಂದಿಸಿ"</string>
    <string name="change_default_dialer_dialog_affirmative" msgid="8604665314757739550">"ಡಿಫಾಲ್ಟ್ ಸೆಟ್ ಮಾಡಿ"</string>
    <string name="change_default_dialer_dialog_negative" msgid="8648669840052697821">"ರದ್ದುಮಾಡಿ"</string>
    <string name="change_default_dialer_warning_message" msgid="8461963987376916114">"<xliff:g id="NEW_APP">%s</xliff:g> ಗೆ ನಿಮ್ಮ ಕರೆಗಳ ಎಲ್ಲಾ ಅಂಶಗಳನ್ನು ನಿಯಂತ್ರಿಸಲು ಮತ್ತು ಕರೆಗಳನ್ನು ಮಾಡಲು ಸಾಧ್ಯವಾಗುತ್ತದೆ. ನೀವು ವಿಶ್ವಾಸವಿರಿಸಿರುವಂತಹ ಆ್ಯಪ್‌ಗಳನ್ನು ಮಾತ್ರ ನಿಮ್ಮ ಡಿಫಾಲ್ಟ್ ಆ್ಯಪ್‌ ಆಗಿ ಹೊಂದಿಸಬೇಕು."</string>
    <string name="change_default_call_screening_dialog_title" msgid="5365787219927262408">"<xliff:g id="NEW_APP">%s</xliff:g> ನಿಮ್ಮ ಡೀಫಾಲ್ಟ್ ಕರೆ ಸ್ಕ್ರೀನಿಂಗ್ ಆ್ಯಪ್‌ ಆಗಿ ಮಾಡಬೇಕೇ?"</string>
    <string name="change_default_call_screening_warning_message_for_disable_old_app" msgid="2039830033533243164">"<xliff:g id="OLD_APP">%s</xliff:g> ಇನ್ನು ಮುಂದೆ ಕರೆಗಳನ್ನು ಸ್ಕ್ರೀನ್‌ ಮಾಡಲು ಸಾಧ್ಯವಾಗುವುದಿಲ್ಲ."</string>
    <string name="change_default_call_screening_warning_message" msgid="9020537562292754269">"<xliff:g id="NEW_APP">%s</xliff:g> ಗೆ ನಿಮ್ಮ ಸಂಪರ್ಕಗಳಲ್ಲಿ ಇಲ್ಲದ ಕರೆದಾರರ ಬಗ್ಗೆ ಮಾಹಿತಿಯನ್ನು ನೋಡಲು ಮತ್ತು ಈ ಕರೆಗಳನ್ನು ಬ್ಲಾಕ್ ಮಾಡಲು ಸಾಧ್ಯವಾಗುತ್ತದೆ. ನೀವು ವಿಶ್ವಾಸವಿರಿಸಿರುವಂತಹ ಆ್ಯಪ್‌ಗಳನ್ನು ಮಾತ್ರ ನಿಮ್ಮ ಡೀಫಾಲ್ಟ್ ಕರೆ ಸ್ಕ್ರೀನಿಂಗ್ ಆ್ಯಪ್‌ ಆಗಿ ಹೊಂದಿಸಬೇಕು."</string>
    <string name="change_default_call_screening_dialog_affirmative" msgid="7162433828280058647">"ಡೀಫಾಲ್ಟ್ ಹೊಂದಿಸಿ"</string>
    <string name="change_default_call_screening_dialog_affirmative" msgid="7162433828280058647">"ಡೀಫಾಲ್ಟ್ ಸೆಟ್ ಮಾಡಿ"</string>
    <string name="change_default_call_screening_dialog_negative" msgid="1839266125623106342">"ರದ್ದುಮಾಡಿ"</string>
    <string name="blocked_numbers" msgid="8322134197039865180">"ನಿರ್ಬಂಧಿಸಲಾದ ಸಂಖ್ಯೆಗಳು"</string>
    <string name="blocked_numbers_msg" msgid="2797422132329662697">"ನಿರ್ಬಂಧಿಸಲಾದ ಸಂಖ್ಯೆಗಳಿಂದ ಕರೆಗಳು ಅಥವಾ ಪಠ್ಯ ಸಂದೇಶಗಳನ್ನು ನೀವು ಸ್ವೀಕರಿಸುವುದಿಲ್ಲ."</string>
+37 −27
Original line number Diff line number Diff line
@@ -978,13 +978,17 @@ public class CallAudioRouteController implements CallAudioRouteAdapter {
     * @return {@link AudioRoute} of the BT device.
     */
    private AudioRoute getArbitraryBluetoothDevice() {
        synchronized (mLock) {
            if (mActiveBluetoothDevice != null) {
            return getBluetoothRoute(mActiveBluetoothDevice.first, mActiveBluetoothDevice.second);
                return getBluetoothRoute(
                    mActiveBluetoothDevice.first, mActiveBluetoothDevice.second);
            } else if (!mBluetoothRoutes.isEmpty()) {
            return mBluetoothRoutes.keySet().stream().toList().get(mBluetoothRoutes.size() - 1);
                return mBluetoothRoutes.keySet().stream().toList()
                    .get(mBluetoothRoutes.size() - 1);
            }
            return null;
        }
    }

    private void handleSwitchHeadset() {
        AudioRoute headsetRoute = mTypeRoutes.get(AudioRoute.TYPE_WIRED);
@@ -1450,8 +1454,11 @@ public class CallAudioRouteController implements CallAudioRouteAdapter {
                continue;
            }
            // Check if the most recently active device is a watch device.
            boolean isActiveDevice = mActiveBluetoothDevice != null
            boolean isActiveDevice;
            synchronized (mLock) {
                isActiveDevice = mActiveBluetoothDevice != null
                    && device.getAddress().equals(mActiveBluetoothDevice.second);
            }
            if (i == (bluetoothRoutes.size() - 1) && mBluetoothRouteManager.isWatch(device)
                    && (device.equals(mCallAudioState.getActiveBluetoothDevice())
                    || isActiveDevice)) {
@@ -1565,16 +1572,18 @@ public class CallAudioRouteController implements CallAudioRouteAdapter {
     *                           address of the device.
     */
    public void updateActiveBluetoothDevice(Pair<Integer, String> device) {
        synchronized (mLock) {
            mActiveDeviceCache.put(device.first, device.second);
        // Update most recently active device if address isn't null (meaning some device is active).
            // Update most recently active device if address isn't null (meaning
            // some device is active).
            if (device.second != null) {
                mActiveBluetoothDevice = device;
            } else {
            // If a device was removed, check to ensure that no other device is still considered
            // active.
                // If a device was removed, check to ensure that no other device is
                //still considered active.
                boolean hasActiveDevice = false;
            List<Map.Entry<Integer, String>> activeBtDevices = new ArrayList<>(
                    mActiveDeviceCache.entrySet());
                List<Map.Entry<Integer, String>> activeBtDevices =
                        new ArrayList<>(mActiveDeviceCache.entrySet());
                for (Map.Entry<Integer, String> activeDevice : activeBtDevices) {
                    Integer btAudioType = activeDevice.getKey();
                    String address = activeDevice.getValue();
@@ -1591,6 +1600,7 @@ public class CallAudioRouteController implements CallAudioRouteAdapter {
                }
            }
        }
    }

    private void updateAvailableRoutes(AudioRoute route, boolean includeRoute) {
        if (includeRoute) {
+10 −9
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@ import android.net.Uri;
import android.os.Binder;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.OutcomeReceiver;
import android.os.ParcelFileDescriptor;
import android.os.Process;
@@ -66,6 +68,7 @@ import android.telecom.DisconnectCause;
import android.telecom.Log;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
import android.telecom.StatusHints;
import android.telecom.TelecomAnalytics;
import android.telecom.TelecomManager;
import android.telecom.VideoProfile;
@@ -3705,18 +3708,16 @@ public class TelecomServiceImpl {
        // incompatible types.
        if (icon != null && (icon.getType() == Icon.TYPE_URI
                || icon.getType() == Icon.TYPE_URI_ADAPTIVE_BITMAP)) {
            String encodedUser = icon.getUri().getEncodedUserInfo();
            // If there is no encoded user, the URI is calling into the calling user space
            if (encodedUser != null) {
                int userId = Integer.parseInt(encodedUser);
                if (userId != UserHandle.getUserId(Binder.getCallingUid())) {
            int callingUserId = UserHandle.getCallingUserId();
            int requestingUserId = StatusHints.getUserIdFromAuthority(
                    icon.getUri().getAuthority(), callingUserId);
            if(callingUserId != requestingUserId) {
                // If we are transcending the profile boundary, throw an error.
                throw new IllegalArgumentException("Attempting to register a phone account with"
                        + " an image icon belonging to another user.");
            }
        }
    }
    }

    private void validateSimultaneousCallingPackageNames(String appPackageName,
            Set<PhoneAccountHandle> handles) {
+14 −0
Original line number Diff line number Diff line
@@ -1095,6 +1095,20 @@ public class TelecomServiceImplTest extends TelecomTestCase {
        // This should fail; security exception will be thrown.
        registerPhoneAccountTestHelper(phoneAccount, false);

        icon = Icon.createWithContentUri(
                new Uri.Builder().scheme("content")
                        .encodedAuthority("10%40media")
                        .path("external/images/media/${mediaId.text}".trim())
                        .build());
        phoneAccount = makePhoneAccount(phHandle).setIcon(icon).build();
        // This should fail; security exception will be thrown
        registerPhoneAccountTestHelper(phoneAccount, false);

        icon = Icon.createWithContentUri( Uri.parse("content://10%40play.ground"));
        phoneAccount = makePhoneAccount(phHandle).setIcon(icon).build();
        // This should fail; security exception will be thrown
        registerPhoneAccountTestHelper(phoneAccount, false);

        icon = Icon.createWithContentUri("content://0@media/external/images/media/");
        phoneAccount = makePhoneAccount(phHandle).setIcon(icon).build();
        // This should succeed.