diff options
author | Kevin F. Haggerty <haggertk@lineageos.org> | 2021-03-02 05:50:02 -0700 |
---|---|---|
committer | Kevin F. Haggerty <haggertk@lineageos.org> | 2021-03-02 05:50:02 -0700 |
commit | 5f3c73c05bf7bc69de8e17cd139e4209f6805f22 (patch) | |
tree | e54b8700a7f59b0dbafd34c0de471dacfc24d12a | |
parent | 1590c968d37b78b8dfcd3cf21a80f380b7613166 (diff) | |
parent | e25d04b71090494ca640e2ee54c175db1f27f78a (diff) |
Merge tag 'android-11.0.0_r32' into staging/lineage-18.1_merge-android-11.0.0_r32
Android 11.0.0 Release 32 (RQ2A.210305.006)
* tag 'android-11.0.0_r32':
Import translations. DO NOT MERGE ANYWHERE
Import translations. DO NOT MERGE ANYWHERE
Import translations. DO NOT MERGE ANYWHERE
Import translations. DO NOT MERGE ANYWHERE
[Suggestion] Check foreground user for API call
ConnectToNetworkNotification: Disallow connect from lock screen
Import translations. DO NOT MERGE ANYWHERE
Import translations. DO NOT MERGE ANYWHERE
Import translations. DO NOT MERGE ANYWHERE
WifiConfigManager: protect CONFIGURED_NETWORKS_CHANGED_ACTION with permissions
WifiConfigManager: protect CONFIGURED_NETWORKS_CHANGED_ACTION with permissions
WifiConfigManager: protect CONFIGURED_NETWORKS_CHANGED_ACTION with permissions
Change-Id: If87fc14f1cd8c50478380ffe14381bdbaafd835b
36 files changed, 293 insertions, 277 deletions
diff --git a/libs/WifiTrackerLib/res/values-bs/arrays.xml b/libs/WifiTrackerLib/res/values-bs/arrays.xml index 727f5d75a..9428a3763 100644 --- a/libs/WifiTrackerLib/res/values-bs/arrays.xml +++ b/libs/WifiTrackerLib/res/values-bs/arrays.xml @@ -27,7 +27,7 @@ <item msgid="1176401854208153464">"Autentifikacija…"</item> <item msgid="1377026397901197257">"Dobivanje IP adrese…"</item> <item msgid="7627139816052121509">"Povezano"</item> - <item msgid="1598801023719359130">"Suspendirano"</item> + <item msgid="1598801023719359130">"Obustavljeno"</item> <item msgid="9160765456671002324">"Prekidanje veze…"</item> <item msgid="8013176736494493734">"Veza je prekinuta"</item> <item msgid="4077393480368783785">"Neuspješno"</item> diff --git a/libs/WifiTrackerLib/res/values-fa/arrays.xml b/libs/WifiTrackerLib/res/values-fa/arrays.xml index af40e8f4c..51ef4b84b 100644 --- a/libs/WifiTrackerLib/res/values-fa/arrays.xml +++ b/libs/WifiTrackerLib/res/values-fa/arrays.xml @@ -24,7 +24,7 @@ <item msgid="8763475525292171481"></item> <item msgid="903308535197209786">"درحال اسکن کردن…"</item> <item msgid="6222852518007967736">"درحال اتصال…"</item> - <item msgid="1176401854208153464">"درحال احراز هویت…"</item> + <item msgid="1176401854208153464">"درحال اصالتسنجی…"</item> <item msgid="1377026397901197257">"درحال دریافت نشانی IP…"</item> <item msgid="7627139816052121509">"متصل"</item> <item msgid="1598801023719359130">"معلق"</item> diff --git a/libs/WifiTrackerLib/res/values-fa/strings.xml b/libs/WifiTrackerLib/res/values-fa/strings.xml index ff2df3ec7..64a913612 100644 --- a/libs/WifiTrackerLib/res/values-fa/strings.xml +++ b/libs/WifiTrackerLib/res/values-fa/strings.xml @@ -20,8 +20,8 @@ <string name="auto_connect_disable" msgid="1078319396240632542">"اتصال خودکار خاموش است"</string> <string name="saved_network" msgid="6241977554502802914">"ذخیرهشده توسط <xliff:g id="NAME">%1$s</xliff:g>"</string> <string name="wifi_no_internet_no_reconnect" msgid="3089980800841926268">"اتصال بهطور خودکار انجام نمیشود"</string> - <string name="wifi_no_internet" msgid="4461212237521310895">"بدون دسترسی به اینترنت"</string> - <string name="wifi_disabled_password_failure" msgid="3015007143699702403">"مشکل احراز هویت"</string> + <string name="wifi_no_internet" msgid="4461212237521310895">"دسترسی به اینترنت ندارد"</string> + <string name="wifi_disabled_password_failure" msgid="3015007143699702403">"مشکل اصالتسنجی"</string> <string name="wifi_check_password_try_again" msgid="2643230209986217827">"گذرواژه را بررسی و دوباره امتحان کنید"</string> <string name="wifi_disabled_network_failure" msgid="6506742207778007439">"پیکربندی IP انجام نشد"</string> <string name="wifi_disabled_generic" msgid="8307050327779256414">"غیرفعال شد"</string> diff --git a/libs/WifiTrackerLib/res/values-gu/strings.xml b/libs/WifiTrackerLib/res/values-gu/strings.xml index f7592c3bd..91ab28936 100644 --- a/libs/WifiTrackerLib/res/values-gu/strings.xml +++ b/libs/WifiTrackerLib/res/values-gu/strings.xml @@ -33,7 +33,7 @@ <string name="connected_via_app" msgid="1818040967936972127">"<xliff:g id="NAME">%1$s</xliff:g> દ્વારા કનેક્ટ થયેલ"</string> <string name="available_via_app" msgid="9110324040292242769">"<xliff:g id="NAME">%1$s</xliff:g> મારફતે ઉપલબ્ધ"</string> <string name="connected_via_network_scorer" msgid="209764314005159012">"<xliff:g id="NAME">%1$s</xliff:g> મારફતે ઑટોમૅટિક રીતે કનેક્ટ કર્યું છે"</string> - <string name="connected_via_network_scorer_default" msgid="3084818437004202462">"નેટવર્ક રેટિંગ પ્રદાતા દ્વારા આપમેળે કનેક્ટ થયું"</string> + <string name="connected_via_network_scorer_default" msgid="3084818437004202462">"નેટવર્ક રેટિંગ પ્રદાતા દ્વારા ઑટોમૅટિક રીતે કનેક્ટ થયું"</string> <string name="wifi_limited_connection" msgid="3646701342701276239">"મર્યાદિત કનેક્શન"</string> <string name="private_dns_broken" msgid="2212227512243587416">"ખાનગી DNS સર્વર ઍક્સેસ કરી શકાતા નથી"</string> <string name="wifi_connected_no_internet" msgid="7273909077465731259">"કોઈ ઇન્ટરનેટ નથી"</string> diff --git a/libs/WifiTrackerLib/res/values-ky/arrays.xml b/libs/WifiTrackerLib/res/values-ky/arrays.xml index 8bcf77784..00ab8f678 100644 --- a/libs/WifiTrackerLib/res/values-ky/arrays.xml +++ b/libs/WifiTrackerLib/res/values-ky/arrays.xml @@ -26,7 +26,7 @@ <item msgid="6222852518007967736">"Туташууда…"</item> <item msgid="1176401854208153464">"Аныктыгы текшерилүүдө…"</item> <item msgid="1377026397901197257">"IP дареги алынууда…"</item> - <item msgid="7627139816052121509">"Туташты"</item> + <item msgid="7627139816052121509">"Туташып турат"</item> <item msgid="1598801023719359130">"Убактылуу токтотулду"</item> <item msgid="9160765456671002324">"Ажыратылууда…"</item> <item msgid="8013176736494493734">"Ажыратылды"</item> diff --git a/libs/WifiTrackerLib/res/values-mk/strings.xml b/libs/WifiTrackerLib/res/values-mk/strings.xml index 457b9471e..93d47f910 100644 --- a/libs/WifiTrackerLib/res/values-mk/strings.xml +++ b/libs/WifiTrackerLib/res/values-mk/strings.xml @@ -45,7 +45,7 @@ <string name="osu_opening_provider" msgid="5633521771769175139">"Се отвора <xliff:g id="PASSPOINTPROVIDER">%1$s</xliff:g>"</string> <string name="osu_connect_failed" msgid="8503501619299851793">"Не може да се поврзе"</string> <string name="osu_completing_sign_up" msgid="7188493241442946231">"Се завршува регистрацијата…"</string> - <string name="osu_sign_up_failed" msgid="2725057866968590279">"Не можеше да се заврши регистрацијата. Допрете за да се обидете повторно."</string> + <string name="osu_sign_up_failed" msgid="2725057866968590279">"Не може да се заврши регистрацијата. Допрете за да се обидете повторно."</string> <string name="osu_sign_up_complete" msgid="7013805426618985953">"Регистрацијата е завршена. Се поврзува…"</string> <string name="imsi_protection_warning" msgid="5231726821588271569">"Мрежава прима ID на SIM-картичка што може да се користи за следење на локацијата на уредот. "<annotation id="url">"Дознајте повеќе"</annotation></string> <string name="speed_label_very_slow" msgid="2401582671941367179">"Многу бавна"</string> diff --git a/libs/WifiTrackerLib/res/values-mn/strings.xml b/libs/WifiTrackerLib/res/values-mn/strings.xml index fbbf8b2d2..9e9b247e6 100644 --- a/libs/WifiTrackerLib/res/values-mn/strings.xml +++ b/libs/WifiTrackerLib/res/values-mn/strings.xml @@ -21,7 +21,7 @@ <string name="saved_network" msgid="6241977554502802914">"<xliff:g id="NAME">%1$s</xliff:g> хадгалсан"</string> <string name="wifi_no_internet_no_reconnect" msgid="3089980800841926268">"Автоматаар холбогдохгүй"</string> <string name="wifi_no_internet" msgid="4461212237521310895">"Интернэт хандалт байхгүй байна"</string> - <string name="wifi_disabled_password_failure" msgid="3015007143699702403">"Нотолгооны асуудал"</string> + <string name="wifi_disabled_password_failure" msgid="3015007143699702403">"Баталгаажуулалтын асуудал"</string> <string name="wifi_check_password_try_again" msgid="2643230209986217827">"Нууц үгийг шалгаад дахин оролдоно уу"</string> <string name="wifi_disabled_network_failure" msgid="6506742207778007439">"IP тохируулга амжилтгүй боллоо"</string> <string name="wifi_disabled_generic" msgid="8307050327779256414">"Идэвхгүйжүүлсэн"</string> diff --git a/libs/WifiTrackerLib/res/values-mr/strings.xml b/libs/WifiTrackerLib/res/values-mr/strings.xml index a0583d723..963956f51 100644 --- a/libs/WifiTrackerLib/res/values-mr/strings.xml +++ b/libs/WifiTrackerLib/res/values-mr/strings.xml @@ -23,7 +23,7 @@ <string name="wifi_no_internet" msgid="4461212237521310895">"इंटरनेट अॅक्सेस नाही"</string> <string name="wifi_disabled_password_failure" msgid="3015007143699702403">"ऑथेंटिकेशन समस्या"</string> <string name="wifi_check_password_try_again" msgid="2643230209986217827">"पासवर्ड तपासा आणि पुन्हा प्रयत्न करा"</string> - <string name="wifi_disabled_network_failure" msgid="6506742207778007439">"IP कॉन्फिगरेशन अयशस्वी"</string> + <string name="wifi_disabled_network_failure" msgid="6506742207778007439">"IP कॉंफिगरेशन अयशस्वी"</string> <string name="wifi_disabled_generic" msgid="8307050327779256414">"अक्षम"</string> <string name="wifi_ap_unable_to_handle_new_sta" msgid="6552198761671428871">"अॅक्सेस पॉइंट तात्पुरते भरलेले"</string> <string name="wifi_disconnected" msgid="3720926757662831062">"डिस्कनेक्ट केले"</string> diff --git a/libs/WifiTrackerLib/res/values-my/strings.xml b/libs/WifiTrackerLib/res/values-my/strings.xml index 2e6dea6a7..524fbb612 100644 --- a/libs/WifiTrackerLib/res/values-my/strings.xml +++ b/libs/WifiTrackerLib/res/values-my/strings.xml @@ -21,7 +21,7 @@ <string name="saved_network" msgid="6241977554502802914">"<xliff:g id="NAME">%1$s</xliff:g> က သိမ်းဆည်းခဲ့သည်"</string> <string name="wifi_no_internet_no_reconnect" msgid="3089980800841926268">"အလိုအလျောက် ချိတ်ဆက်မည်မဟုတ်ပါ"</string> <string name="wifi_no_internet" msgid="4461212237521310895">"အင်တာနက် ချိတ်ဆက်မှု မရှိပါ"</string> - <string name="wifi_disabled_password_failure" msgid="3015007143699702403">"အထောက်အထားစိစစ်ခြင်း ပြဿနာ"</string> + <string name="wifi_disabled_password_failure" msgid="3015007143699702403">"အထောက်အထားစိစစ်မှု ပြဿနာ"</string> <string name="wifi_check_password_try_again" msgid="2643230209986217827">"စကားဝှက်ကို စစ်ဆေးပြီး ထပ်လုပ်ကြည့်ပါ"</string> <string name="wifi_disabled_network_failure" msgid="6506742207778007439">"IP စီစဉ်သတ်မှတ်ခြင်း မအောင်မြင်ပါ"</string> <string name="wifi_disabled_generic" msgid="8307050327779256414">"ပိတ်ထားသည်"</string> diff --git a/libs/WifiTrackerLib/res/values-th/strings.xml b/libs/WifiTrackerLib/res/values-th/strings.xml index bded04361..8303fe178 100644 --- a/libs/WifiTrackerLib/res/values-th/strings.xml +++ b/libs/WifiTrackerLib/res/values-th/strings.xml @@ -28,7 +28,7 @@ <string name="wifi_ap_unable_to_handle_new_sta" msgid="6552198761671428871">"จุดเข้าใช้งานเต็มชั่วคราว"</string> <string name="wifi_disconnected" msgid="3720926757662831062">"ยกเลิกการเชื่อมต่อแล้ว"</string> <string name="wifi_remembered" msgid="5126903736498678708">"บันทึกแล้ว"</string> - <string name="wifi_metered_label" msgid="1362621600006544014">"มีการวัดปริมาณอินเทอร์เน็ต"</string> + <string name="wifi_metered_label" msgid="1362621600006544014">"มีการจำกัดปริมาณอินเทอร์เน็ต"</string> <string name="wifi_unmetered_label" msgid="499466875639448350">"ไม่มีการวัดปริมาณอินเทอร์เน็ต"</string> <string name="connected_via_app" msgid="1818040967936972127">"เชื่อมต่อแล้วผ่าน <xliff:g id="NAME">%1$s</xliff:g>"</string> <string name="available_via_app" msgid="9110324040292242769">"ใช้งานได้ผ่านทาง <xliff:g id="NAME">%1$s</xliff:g>"</string> diff --git a/libs/WifiTrackerLib/res/values-ur/strings.xml b/libs/WifiTrackerLib/res/values-ur/strings.xml index 6fc5bf546..2bc36a53b 100644 --- a/libs/WifiTrackerLib/res/values-ur/strings.xml +++ b/libs/WifiTrackerLib/res/values-ur/strings.xml @@ -22,7 +22,7 @@ <string name="wifi_no_internet_no_reconnect" msgid="3089980800841926268">"خودکار طور پر منسلک نہیں ہو گا"</string> <string name="wifi_no_internet" msgid="4461212237521310895">"انٹرنیٹ تک کوئی رسائی نہیں"</string> <string name="wifi_disabled_password_failure" msgid="3015007143699702403">"توثیق کا مسئلہ"</string> - <string name="wifi_check_password_try_again" msgid="2643230209986217827">"پاسورڈ چیک کر کے دوبارہ کوشش کریں"</string> + <string name="wifi_check_password_try_again" msgid="2643230209986217827">"پاس ورڈ چیک کر کے دوبارہ کوشش کریں"</string> <string name="wifi_disabled_network_failure" msgid="6506742207778007439">"IP کنفیگریشن کی ناکامی"</string> <string name="wifi_disabled_generic" msgid="8307050327779256414">"غیر فعال"</string> <string name="wifi_ap_unable_to_handle_new_sta" msgid="6552198761671428871">"رسائی پوائنٹ عارضی طور پر فُل ہے"</string> diff --git a/libs/WifiTrackerLib/res/values-uz/strings.xml b/libs/WifiTrackerLib/res/values-uz/strings.xml index 81634a4df..f19791ea1 100644 --- a/libs/WifiTrackerLib/res/values-uz/strings.xml +++ b/libs/WifiTrackerLib/res/values-uz/strings.xml @@ -27,7 +27,7 @@ <string name="wifi_disabled_generic" msgid="8307050327779256414">"Yoqilmagan"</string> <string name="wifi_ap_unable_to_handle_new_sta" msgid="6552198761671428871">"Internet kirish nuqtasi vaqtinchalik to‘lgan"</string> <string name="wifi_disconnected" msgid="3720926757662831062">"Ulanmagan"</string> - <string name="wifi_remembered" msgid="5126903736498678708">"Saqlandi"</string> + <string name="wifi_remembered" msgid="5126903736498678708">"Saqlangan"</string> <string name="wifi_metered_label" msgid="1362621600006544014">"Trafik hisoblanadigan tarmoq"</string> <string name="wifi_unmetered_label" msgid="499466875639448350">"Trafik hisobi yuritilmaydigan tarmoq"</string> <string name="connected_via_app" msgid="1818040967936972127">"<xliff:g id="NAME">%1$s</xliff:g> orqali ulandi"</string> diff --git a/service/java/com/android/server/wifi/ConnectToNetworkNotificationBuilder.java b/service/java/com/android/server/wifi/ConnectToNetworkNotificationBuilder.java index 4f7b4e820..053314dc7 100644 --- a/service/java/com/android/server/wifi/ConnectToNetworkNotificationBuilder.java +++ b/service/java/com/android/server/wifi/ConnectToNetworkNotificationBuilder.java @@ -16,6 +16,8 @@ package com.android.server.wifi; +import static android.app.Notification.VISIBILITY_SECRET; + import android.app.Notification; import android.app.PendingIntent; import android.content.Intent; @@ -95,6 +97,7 @@ public class ConnectToNetworkNotificationBuilder { .setContentIntent(getPrivateBroadcast(ACTION_PICK_WIFI_NETWORK, notifierTag)) .addAction(connectAction) .addAction(allNetworksAction) + .setVisibility(VISIBILITY_SECRET) .build(); } diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java index 83cabf756..8fc91cb09 100644 --- a/service/java/com/android/server/wifi/WifiConfigManager.java +++ b/service/java/com/android/server/wifi/WifiConfigManager.java @@ -913,32 +913,6 @@ public class WifiConfigManager { } /** - * Check if the given UID belongs to the current foreground user. This is - * used to prevent apps running in background users from modifying network - * configurations. - * <p> - * UIDs belonging to system internals (such as SystemUI) are always allowed, - * since they always run as {@link UserHandle#USER_SYSTEM}. - * - * @param uid uid of the app. - * @return true if the given UID belongs to the current foreground user, - * otherwise false. - */ - private boolean doesUidBelongToCurrentUser(int uid) { - if (uid == android.os.Process.SYSTEM_UID - // UIDs with the NETWORK_SETTINGS permission are always allowed since they are - // acting on behalf of the user. - || mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)) { - return true; - } else { - UserHandle currentUser = UserHandle.of(mCurrentUserId); - UserHandle callingUser = UserHandle.getUserHandleForUid(uid); - return currentUser.equals(callingUser) - || mUserManager.isSameProfileGroup(currentUser, callingUser); - } - } - - /** * Copy over public elements from an external WifiConfiguration object to the internal * configuration object if element has been set in the provided external WifiConfiguration. * The only exception is the hidden |IpConfiguration| parameters, these need to be copied over @@ -1333,7 +1307,7 @@ public class WifiConfigManager { */ public NetworkUpdateResult addOrUpdateNetwork(WifiConfiguration config, int uid, @Nullable String packageName) { - if (!doesUidBelongToCurrentUser(uid)) { + if (!mWifiPermissionsUtil.doesUidBelongToCurrentUser(uid)) { Log.e(TAG, "UID " + uid + " not visible to the current user"); return new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID); } @@ -1439,7 +1413,7 @@ public class WifiConfigManager { * @return true if successful, false otherwise. */ public boolean removeNetwork(int networkId, int uid, String packageName) { - if (!doesUidBelongToCurrentUser(uid)) { + if (!mWifiPermissionsUtil.doesUidBelongToCurrentUser(uid)) { Log.e(TAG, "UID " + uid + " not visible to the current user"); return false; } @@ -1848,7 +1822,7 @@ public class WifiConfigManager { if (mVerboseLoggingEnabled) { Log.v(TAG, "Enabling network " + networkId + " (disableOthers " + disableOthers + ")"); } - if (!doesUidBelongToCurrentUser(uid)) { + if (!mWifiPermissionsUtil.doesUidBelongToCurrentUser(uid)) { Log.e(TAG, "UID " + uid + " not visible to the current user"); return false; } @@ -1886,7 +1860,7 @@ public class WifiConfigManager { if (mVerboseLoggingEnabled) { Log.v(TAG, "Disabling network " + networkId); } - if (!doesUidBelongToCurrentUser(uid)) { + if (!mWifiPermissionsUtil.doesUidBelongToCurrentUser(uid)) { Log.e(TAG, "UID " + uid + " not visible to the current user"); return false; } @@ -1954,7 +1928,7 @@ public class WifiConfigManager { if (mVerboseLoggingEnabled) { Log.v(TAG, "Update network last connect UID for " + networkId); } - if (!doesUidBelongToCurrentUser(uid)) { + if (!mWifiPermissionsUtil.doesUidBelongToCurrentUser(uid)) { Log.e(TAG, "UID " + uid + " not visible to the current user"); return false; } @@ -2926,7 +2900,8 @@ public class WifiConfigManager { Set<Integer> removedNetworkIds = new HashSet<>(); // Remove any private networks of the old user before switching the userId. for (WifiConfiguration config : getConfiguredNetworks()) { - if ((!config.shared && doesUidBelongToCurrentUser(config.creatorUid)) + if ((!config.shared && !mWifiPermissionsUtil + .doesUidBelongToCurrentUser(config.creatorUid)) || config.ephemeral) { removedNetworkIds.add(config.networkId); localLog("clearInternalUserData: removed config." @@ -3153,7 +3128,8 @@ public class WifiConfigManager { // Migrate the legacy Passpoint configurations owned by the current user to // {@link PasspointManager}. - if (config.isLegacyPasspointConfig && doesUidBelongToCurrentUser(config.creatorUid)) { + if (config.isLegacyPasspointConfig && !mWifiPermissionsUtil + .doesUidBelongToCurrentUser(config.creatorUid)) { legacyPasspointNetId.add(config.networkId); // Migrate the legacy Passpoint configuration and add it to PasspointManager. if (!PasspointManager.addLegacyPasspointConfig(config)) { @@ -3173,7 +3149,8 @@ public class WifiConfigManager { // because all networks were previously stored in a central file. We cannot // write these private networks to the user specific store until the corresponding // user logs in. - if (config.shared || !doesUidBelongToCurrentUser(config.creatorUid)) { + if (config.shared || !mWifiPermissionsUtil + .doesUidBelongToCurrentUser(config.creatorUid)) { sharedConfigurations.add(config); } else { userConfigurations.add(config); diff --git a/service/java/com/android/server/wifi/WifiInjector.java b/service/java/com/android/server/wifi/WifiInjector.java index 993debba5..48f1b3f2e 100644 --- a/service/java/com/android/server/wifi/WifiInjector.java +++ b/service/java/com/android/server/wifi/WifiInjector.java @@ -305,7 +305,7 @@ public class WifiInjector { mPasspointManager = new PasspointManager(mContext, this, wifiHandler, mWifiNative, mWifiKeyStore, mClock, new PasspointObjectFactory(), mWifiConfigManager, mWifiConfigStore, mWifiMetrics, mWifiCarrierInfoManager, - mMacAddressUtil); + mMacAddressUtil, mWifiPermissionsUtil); PasspointNetworkNominateHelper nominateHelper = new PasspointNetworkNominateHelper(mPasspointManager, mWifiConfigManager, mConnectivityLocalLog); diff --git a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java index 464ced0ad..2632835e6 100644 --- a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java +++ b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java @@ -390,6 +390,7 @@ public class WifiNetworkSuggestionsManager { private boolean mIsLastUserApprovalUiDialog = false; private boolean mUserDataLoaded = false; + /** * Listener for app-ops changes for active suggestor apps. */ @@ -833,6 +834,10 @@ public class WifiNetworkSuggestionsManager { public @WifiManager.NetworkSuggestionsStatusCode int add( List<WifiNetworkSuggestion> networkSuggestions, int uid, String packageName, @Nullable String featureId) { + if (!mWifiPermissionsUtil.doesUidBelongToCurrentUser(uid)) { + Log.e(TAG, "UID " + uid + " not visible to the current user"); + return WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_INTERNAL; + } if (!mUserDataLoaded) { Log.e(TAG, "Add Network suggestion before boot complete is not allowed."); return WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_INTERNAL; @@ -1108,6 +1113,10 @@ public class WifiNetworkSuggestionsManager { */ public @WifiManager.NetworkSuggestionsStatusCode int remove( List<WifiNetworkSuggestion> networkSuggestions, int uid, String packageName) { + if (!mWifiPermissionsUtil.doesUidBelongToCurrentUser(uid)) { + Log.e(TAG, "UID " + uid + " not visible to the current user"); + return WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_INTERNAL; + } if (!mUserDataLoaded) { Log.e(TAG, "Remove Network suggestion before boot complete is not allowed."); return WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_INTERNAL; @@ -1166,8 +1175,12 @@ public class WifiNetworkSuggestionsManager { * Get all network suggestion for target App * @return List of WifiNetworkSuggestions */ - public @NonNull List<WifiNetworkSuggestion> get(@NonNull String packageName) { + public @NonNull List<WifiNetworkSuggestion> get(@NonNull String packageName, int uid) { List<WifiNetworkSuggestion> networkSuggestionList = new ArrayList<>(); + if (!mWifiPermissionsUtil.doesUidBelongToCurrentUser(uid)) { + Log.e(TAG, "UID " + uid + " not visible to the current user"); + return networkSuggestionList; + } if (!mUserDataLoaded) { Log.e(TAG, "Get Network suggestion before boot complete is not allowed."); return networkSuggestionList; @@ -1923,11 +1936,16 @@ public class WifiNetworkSuggestionsManager { * @param binder IBinder instance to allow cleanup if the app dies. * @param listener ISuggestionNetworkCallback instance to add. * @param listenerIdentifier identifier of the listener, should be hash code of listener. + * @param uid uid of the app. * @return true if succeed otherwise false. */ public boolean registerSuggestionConnectionStatusListener(@NonNull IBinder binder, @NonNull ISuggestionConnectionStatusListener listener, - int listenerIdentifier, String packageName) { + int listenerIdentifier, String packageName, int uid) { + if (!mWifiPermissionsUtil.doesUidBelongToCurrentUser(uid)) { + Log.e(TAG, "UID " + uid + " not visible to the current user"); + return false; + } ExternalCallbackTracker<ISuggestionConnectionStatusListener> listenersTracker = mSuggestionStatusListenerPerApp.get(packageName); if (listenersTracker == null) { @@ -1942,9 +1960,14 @@ public class WifiNetworkSuggestionsManager { /** * Unregister a listener on network connection failure. * @param listenerIdentifier identifier of the listener, should be hash code of listener. + * @param uid uid of the app. */ public void unregisterSuggestionConnectionStatusListener(int listenerIdentifier, - String packageName) { + String packageName, int uid) { + if (!mWifiPermissionsUtil.doesUidBelongToCurrentUser(uid)) { + Log.e(TAG, "UID " + uid + " not visible to the current user"); + return; + } ExternalCallbackTracker<ISuggestionConnectionStatusListener> listenersTracker = mSuggestionStatusListenerPerApp.get(packageName); if (listenersTracker == null || listenersTracker.remove(listenerIdentifier) == null) { diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java index 5019f54e8..3b4f39796 100644 --- a/service/java/com/android/server/wifi/WifiServiceImpl.java +++ b/service/java/com/android/server/wifi/WifiServiceImpl.java @@ -3893,13 +3893,15 @@ public class WifiServiceImpl extends BaseWifiService { * @return a list of network suggestions suggested by this app */ public List<WifiNetworkSuggestion> getNetworkSuggestions(String callingPackageName) { - mAppOps.checkPackage(Binder.getCallingUid(), callingPackageName); + int callingUid = Binder.getCallingUid(); + mAppOps.checkPackage(callingUid, callingPackageName); enforceAccessPermission(); if (mVerboseLoggingEnabled) { mLog.info("getNetworkSuggestionList uid=%").c(Binder.getCallingUid()).flush(); } return mWifiThreadRunner.call(() -> - mWifiNetworkSuggestionsManager.get(callingPackageName), Collections.emptyList()); + mWifiNetworkSuggestionsManager.get(callingPackageName, callingUid), + Collections.emptyList()); } /** @@ -4227,7 +4229,7 @@ public class WifiServiceImpl extends BaseWifiService { mWifiThreadRunner.post(() -> mWifiNetworkSuggestionsManager .registerSuggestionConnectionStatusListener(binder, listener, - listenerIdentifier, packageName)); + listenerIdentifier, packageName, uid)); } /** @@ -4237,14 +4239,15 @@ public class WifiServiceImpl extends BaseWifiService { public void unregisterSuggestionConnectionStatusListener( int listenerIdentifier, String packageName) { enforceAccessPermission(); + int uid = Binder.getCallingUid(); if (mVerboseLoggingEnabled) { mLog.info("unregisterSuggestionConnectionStatusListener uid=%") - .c(Binder.getCallingUid()).flush(); + .c(uid).flush(); } mWifiThreadRunner.post(() -> mWifiNetworkSuggestionsManager .unregisterSuggestionConnectionStatusListener(listenerIdentifier, - packageName)); + packageName, uid)); } @Override diff --git a/service/java/com/android/server/wifi/hotspot2/PasspointManager.java b/service/java/com/android/server/wifi/hotspot2/PasspointManager.java index 9cb4254c0..d398759ab 100644 --- a/service/java/com/android/server/wifi/hotspot2/PasspointManager.java +++ b/service/java/com/android/server/wifi/hotspot2/PasspointManager.java @@ -57,6 +57,7 @@ import com.android.server.wifi.hotspot2.anqp.HSOsuProvidersElement; import com.android.server.wifi.hotspot2.anqp.OsuProviderInfo; import com.android.server.wifi.proto.nano.WifiMetricsProto.UserActionEvent; import com.android.server.wifi.util.InformationElementUtil; +import com.android.server.wifi.util.WifiPermissionsUtil; import java.io.IOException; import java.io.PrintWriter; @@ -122,6 +123,7 @@ public class PasspointManager { private final AppOpsManager mAppOps; private final WifiCarrierInfoManager mWifiCarrierInfoManager; private final MacAddressUtil mMacAddressUtil; + private final WifiPermissionsUtil mWifiPermissionsUtil; /** * Map of package name of an app to the app ops changed listener for the app. @@ -309,7 +311,8 @@ public class PasspointManager { WifiConfigStore wifiConfigStore, WifiMetrics wifiMetrics, WifiCarrierInfoManager wifiCarrierInfoManager, - MacAddressUtil macAddressUtil) { + MacAddressUtil macAddressUtil, + WifiPermissionsUtil wifiPermissionsUtil) { mPasspointEventHandler = objectFactory.makePasspointEventHandler(wifiNative, new CallbackHandler(context)); mWifiInjector = wifiInjector; @@ -332,6 +335,7 @@ public class PasspointManager { mAppOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); sPasspointManager = this; mMacAddressUtil = macAddressUtil; + mWifiPermissionsUtil = wifiPermissionsUtil; } /** @@ -412,6 +416,10 @@ public class PasspointManager { Log.e(TAG, "Set isTrusted to false on a non suggestion passpoint is not allowed"); return false; } + if (!mWifiPermissionsUtil.doesUidBelongToCurrentUser(uid)) { + Log.e(TAG, "UID " + uid + " not visible to the current user"); + return false; + } mWifiCarrierInfoManager.tryUpdateCarrierIdForPasspoint(config); // Create a provider and install the necessary certificates and keys. @@ -505,6 +513,10 @@ public class PasspointManager { + provider.getCreatorUid()); return false; } + if (!mWifiPermissionsUtil.doesUidBelongToCurrentUser(callingUid)) { + Log.e(TAG, "UID " + callingUid + " not visible to the current user"); + return false; + } provider.uninstallCertsAndKeys(); String packageName = provider.getPackageName(); // Remove any configs corresponding to the profile in WifiConfigManager. diff --git a/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java b/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java index 63197ea6d..ebe7ea481 100644 --- a/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java +++ b/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java @@ -30,6 +30,7 @@ import android.os.Build; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; +import android.util.EventLog; import android.util.Log; import com.android.internal.annotations.GuardedBy; @@ -589,4 +590,32 @@ public class WifiPermissionsUtil { if (devicePolicyManager == null) return false; return devicePolicyManager.isProfileOwnerApp(packageName); } + + /** + * Check if the given UID belongs to the current foreground user. This is + * used to prevent apps running in background users from modifying network + * configurations. + * <p> + * UIDs belonging to system internals (such as SystemUI) are always allowed, + * since they always run as {@link UserHandle#USER_SYSTEM}. + * + * @param uid uid of the app. + * @return true if the given UID belongs to the current foreground user, + * otherwise false. + */ + public boolean doesUidBelongToCurrentUser(int uid) { + if (uid == android.os.Process.SYSTEM_UID + // UIDs with the NETWORK_SETTINGS permission are always allowed since they are + // acting on behalf of the user. + || checkNetworkSettingsPermission(uid)) { + return true; + } + boolean isCurrentProfile = isCurrentProfile(uid); + if (!isCurrentProfile) { + // Fix for b/174749461 + EventLog.writeEvent(0x534e4554, "174749461", -1, + "Non foreground user trying to modify wifi configuration"); + } + return isCurrentProfile; + } } diff --git a/service/res/values-b+sr+Latn/strings.xml b/service/res/values-b+sr+Latn/strings.xml index 61fec3cfd..634f9a743 100644 --- a/service/res/values-b+sr+Latn/strings.xml +++ b/service/res/values-b+sr+Latn/strings.xml @@ -16,9 +16,9 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="wifiResourcesAppLabel" product="default" msgid="4965162975090543792">"Sistemski Wi-Fi resursi"</string> + <string name="wifiResourcesAppLabel" product="default" msgid="4965162975090543792">"Sistemski WiFi resursi"</string> <string name="wifi_available_title" msgid="2844963247498642107">"Povežite se sa otvorenom Wi‑Fi mrežom"</string> - <string name="wifi_available_title_connecting" msgid="4308431577637294026">"Povezuje se sa Wi-Fi mrežom..."</string> + <string name="wifi_available_title_connecting" msgid="4308431577637294026">"Povezuje se sa WiFi mrežom..."</string> <string name="wifi_available_title_connected" msgid="922603556292157664">"Povezali ste se sa Wi‑Fi mrežom"</string> <string name="wifi_available_title_failed_to_connect" msgid="2304443371893419545">"Povezivanje sa Wi‑Fi mrežom nije uspelo"</string> <string name="wifi_available_content_failed_to_connect" msgid="3171283790496729136">"Dodirnite da biste videli sve mreže"</string> @@ -31,7 +31,7 @@ <string name="wifi_suggestion_content" msgid="7796523101671166285">"Mreže koje predlaže <xliff:g id="NAME">%s</xliff:g>. Uređaj će se možda povezati automatski."</string> <string name="wifi_suggestion_action_allow_app" msgid="1269853856167682235">"Dozvoli"</string> <string name="wifi_suggestion_action_disallow_app" msgid="4844316521687534924">"Ne, hvala"</string> - <string name="wifi_suggestion_imsi_privacy_title" msgid="442867569519352918">"Želite da se povežete na Wi-Fi mrežu <xliff:g id="CARRIERNAME">%s</xliff:g>?"</string> + <string name="wifi_suggestion_imsi_privacy_title" msgid="442867569519352918">"Želite da se povežete na WiFi mrežu <xliff:g id="CARRIERNAME">%s</xliff:g>?"</string> <string name="wifi_suggestion_imsi_privacy_content" msgid="6631744859477949328">"Ove mreže dobijaju ID SIM kartice koji može da se koristi za praćenje lokacije uređaja"</string> <string name="wifi_suggestion_action_allow_imsi_privacy_exemption_carrier" msgid="6445286383390779291">"Poveži"</string> <string name="wifi_suggestion_action_disallow_imsi_privacy_exemption_carrier" msgid="1466870675651864648">"Ne povezuj"</string> @@ -44,10 +44,10 @@ <string name="wifi_wakeup_onboarding_action_disable" msgid="672002169958868470">"Ne uključuj ponovo"</string> <string name="wifi_wakeup_enabled_title" msgid="7758584632765597662">"Wi‑Fi je automatski uključen"</string> <string name="wifi_wakeup_enabled_content" msgid="4713038331224656338">"U blizini ste sačuvane mreže: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string> - <string name="wifi_watchdog_network_disabled" msgid="688248897654073438">"Nije moguće povezati sa Wi-Fi mrežom"</string> + <string name="wifi_watchdog_network_disabled" msgid="688248897654073438">"Nije moguće povezati sa WiFi mrežom"</string> <string name="wifi_watchdog_network_disabled_detailed" msgid="2946200607682633112">" ima lošu internet vezu."</string> <string name="wifi_connect_alert_title" msgid="6144470472092017636">"Želite li da dozvolite povezivanje?"</string> - <string name="wifi_connect_alert_message" msgid="3123801378559831220">"Aplikacija %1$s želi da se poveže na Wi-Fi mrežu %2$s"</string> + <string name="wifi_connect_alert_message" msgid="3123801378559831220">"Aplikacija %1$s želi da se poveže na WiFi mrežu %2$s"</string> <string name="wifi_connect_default_application" msgid="6164721692891325243">"Aplikacija"</string> <string name="accept" msgid="5931271886782610829">"Prihvati"</string> <string name="decline" msgid="6874256900873707640">"Odbij"</string> @@ -58,9 +58,9 @@ <string name="wifi_p2p_to_message" msgid="6664932426704362946">"Kome:"</string> <string name="wifi_p2p_enter_pin_message" msgid="5661843905965463456">"Unesite potrebni PIN:"</string> <string name="wifi_p2p_show_pin_message" msgid="4332876077723766909">"PIN:"</string> - <string name="wifi_p2p_frequency_conflict_message" product="tablet" msgid="3372859876274663802">"Tablet će privremeno prekinuti vezu sa Wi-Fi-jem dok je povezan sa uređajem <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string> - <string name="wifi_p2p_frequency_conflict_message" product="tv" msgid="406603193215934517">"Android TV uređaj će privremeno prekinuti vezu sa Wi-Fi mrežom dok je povezan sa uređajem <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string> - <string name="wifi_p2p_frequency_conflict_message" product="default" msgid="2723785832319900478">"Telefon će privremeno prekinuti vezu sa Wi-Fi-jem dok je povezan sa uređajem <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string> + <string name="wifi_p2p_frequency_conflict_message" product="tablet" msgid="3372859876274663802">"Tablet će privremeno prekinuti vezu sa WiFi-em dok je povezan sa uređajem <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string> + <string name="wifi_p2p_frequency_conflict_message" product="tv" msgid="406603193215934517">"Android TV uređaj će privremeno prekinuti vezu sa WiFi mrežom dok je povezan sa uređajem <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string> + <string name="wifi_p2p_frequency_conflict_message" product="default" msgid="2723785832319900478">"Telefon će privremeno prekinuti vezu sa WiFi-em dok je povezan sa uređajem <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string> <string name="dlg_ok" msgid="3250085870426030310">"Potvrdi"</string> <string name="wifi_cannot_connect_with_randomized_mac_title" msgid="3161171832972320854">"Povezivanje na mrežu <xliff:g id="SSID">%1$s</xliff:g> nije uspelo"</string> <string name="wifi_cannot_connect_with_randomized_mac_message" msgid="3084495849409387375">"Dodirnite da biste promenili podešavanja privatnosti i probali ponovo"</string> @@ -79,6 +79,6 @@ <string name="wifi_eap_error_message_code_32766" msgid="6907401733158262194">"<xliff:g id="SSID">%1$s</xliff:g>: EAP greška pri potvrdi identiteta 32766"</string> <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="3145323037688670043">"Hotspot je isključen"</string> <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="5136282560556465701">"Nijedan uređaj nije povezan. Dodirnite da biste izmenili."</string> - <string name="wifi_sim_required_title" msgid="8362843050699015640">"Wi-Fi veza je prekinuta"</string> - <string name="wifi_sim_required_message" msgid="6085636103482409595">"Da biste se povezali na mrežu <xliff:g id="SSID">%1$s</xliff:g>, umetnite <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM karticu"</string> + <string name="wifi_sim_required_title" msgid="8362843050699015640">"WiFi veza je prekinuta"</string> + <string name="wifi_sim_required_message" msgid="6085636103482409595">"Da biste se povezali na mrežu <xliff:g id="SSID">%1$s</xliff:g>, stavite <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM karticu"</string> </resources> diff --git a/service/res/values-en-rXC/strings.xml b/service/res/values-en-rXC/strings.xml deleted file mode 100644 index 6cefae1ae..000000000 --- a/service/res/values-en-rXC/strings.xml +++ /dev/null @@ -1,84 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright (C) 2019 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="wifiResourcesAppLabel" product="default" msgid="4965162975090543792">"System Wi-Fi Resources"</string> - <string name="wifi_available_title" msgid="2844963247498642107">"Connect to open Wi‑Fi network"</string> - <string name="wifi_available_title_connecting" msgid="4308431577637294026">"Connecting to Wi‑Fi network"</string> - <string name="wifi_available_title_connected" msgid="922603556292157664">"Connected to Wi‑Fi network"</string> - <string name="wifi_available_title_failed_to_connect" msgid="2304443371893419545">"Could not connect to Wi‑Fi network"</string> - <string name="wifi_available_content_failed_to_connect" msgid="3171283790496729136">"Tap to see all networks"</string> - <string name="wifi_available_action_connect" msgid="7989951293406720158">"Connect"</string> - <string name="wifi_available_action_all_networks" msgid="2616926772813472478">"All networks"</string> - <string name="notification_channel_network_status" msgid="7808526906954286713">"Network status"</string> - <string name="notification_channel_network_alerts" msgid="3638265846217667221">"Network alerts"</string> - <string name="notification_channel_network_available" msgid="7791052175212297403">"Network available"</string> - <string name="wifi_suggestion_title" msgid="8724552631151189767">"Allow suggested Wi‑Fi networks?"</string> - <string name="wifi_suggestion_content" msgid="7796523101671166285">"<xliff:g id="NAME">%s</xliff:g> suggested networks. Device may connect automatically."</string> - <string name="wifi_suggestion_action_allow_app" msgid="1269853856167682235">"Allow"</string> - <string name="wifi_suggestion_action_disallow_app" msgid="4844316521687534924">"No thanks"</string> - <string name="wifi_suggestion_imsi_privacy_title" msgid="442867569519352918">"Connect to <xliff:g id="CARRIERNAME">%s</xliff:g> Wi‑Fi?"</string> - <string name="wifi_suggestion_imsi_privacy_content" msgid="6631744859477949328">"These networks receive a SIM ID that can be used to track device location"</string> - <string name="wifi_suggestion_action_allow_imsi_privacy_exemption_carrier" msgid="6445286383390779291">"Connect"</string> - <string name="wifi_suggestion_action_disallow_imsi_privacy_exemption_carrier" msgid="1466870675651864648">"Don\'t connect"</string> - <string name="wifi_suggestion_imsi_privacy_exemption_confirmation_title" msgid="3252889810011175876">"Confirm connection?"</string> - <string name="wifi_suggestion_imsi_privacy_exemption_confirmation_content" msgid="1665277613133133730">"If you connect, <xliff:g id="CARRIERNAME">%s</xliff:g> Wi‑Fi networks may access or share a unique ID associated with your SIM. This may allow your device\'s location to be tracked."</string> - <string name="wifi_suggestion_action_allow_imsi_privacy_exemption_confirmation" msgid="3102046304611708608">"Connect"</string> - <string name="wifi_suggestion_action_disallow_imsi_privacy_exemption_confirmation" msgid="8467281276632253246">"Don\'t connect"</string> - <string name="wifi_wakeup_onboarding_title" msgid="8825510461478671504">"Wi‑Fi will turn on automatically"</string> - <string name="wifi_wakeup_onboarding_subtext" msgid="2525097093651287599">"When you\'re near a high quality saved network"</string> - <string name="wifi_wakeup_onboarding_action_disable" msgid="672002169958868470">"Don\'t turn back on"</string> - <string name="wifi_wakeup_enabled_title" msgid="7758584632765597662">"Wi‑Fi turned on automatically"</string> - <string name="wifi_wakeup_enabled_content" msgid="4713038331224656338">"You\'re near a saved network: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string> - <string name="wifi_watchdog_network_disabled" msgid="688248897654073438">"Couldn\'t connect to Wi-Fi"</string> - <string name="wifi_watchdog_network_disabled_detailed" msgid="2946200607682633112">" has a poor internet connection."</string> - <string name="wifi_connect_alert_title" msgid="6144470472092017636">"Allow connection?"</string> - <string name="wifi_connect_alert_message" msgid="3123801378559831220">"Application %1$s would like to connect to Wifi Network %2$s"</string> - <string name="wifi_connect_default_application" msgid="6164721692891325243">"An application"</string> - <string name="accept" msgid="5931271886782610829">"Accept"</string> - <string name="decline" msgid="6874256900873707640">"Decline"</string> - <string name="ok" msgid="4215387532539340948">"OK"</string> - <string name="wifi_p2p_invitation_sent_title" msgid="6684220950195735982">"Invitation sent"</string> - <string name="wifi_p2p_invitation_to_connect_title" msgid="5020192895172598089">"Invitation to connect"</string> - <string name="wifi_p2p_from_message" msgid="3857436922001981191">"From:"</string> - <string name="wifi_p2p_to_message" msgid="6664932426704362946">"To:"</string> - <string name="wifi_p2p_enter_pin_message" msgid="5661843905965463456">"Type the required PIN:"</string> - <string name="wifi_p2p_show_pin_message" msgid="4332876077723766909">"PIN:"</string> - <string name="wifi_p2p_frequency_conflict_message" product="tablet" msgid="3372859876274663802">"The tablet will temporarily disconnect from Wi-Fi while it\'s connected to <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string> - <string name="wifi_p2p_frequency_conflict_message" product="tv" msgid="406603193215934517">"Your Android TV device will temporarily disconnect from Wi-Fi while it\'s connected to <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string> - <string name="wifi_p2p_frequency_conflict_message" product="default" msgid="2723785832319900478">"The phone will temporarily disconnect from Wi-Fi while it\'s connected to <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string> - <string name="dlg_ok" msgid="3250085870426030310">"OK"</string> - <string name="wifi_cannot_connect_with_randomized_mac_title" msgid="3161171832972320854">"Can\'t connect to <xliff:g id="SSID">%1$s</xliff:g>"</string> - <string name="wifi_cannot_connect_with_randomized_mac_message" msgid="3084495849409387375">"Tap to change privacy settings and retry"</string> - <string name="wifi_disable_mac_randomization_dialog_title" msgid="7200723795776228456">"Change privacy setting?"</string> - <string name="wifi_disable_mac_randomization_dialog_message" msgid="6780528750693169829">"To connect, <xliff:g id="SSID">%1$s</xliff:g> needs to use your device MAC address, a unique identifier. Currently, your privacy setting for this network uses a randomized identifier. \n\nThis change may allow your device\'s location to be tracked by nearby devices."</string> - <string name="wifi_disable_mac_randomization_dialog_confirm_text" msgid="6592972299988727403">"Change setting"</string> - <string name="wifi_disable_mac_randomization_dialog_success" msgid="7288972191769783828">"Setting updated. Try connecting again."</string> - <string name="wifi_disable_mac_randomization_dialog_failure" msgid="1823128152758990275">"Can\'t change privacy setting"</string> - <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="2352188098110676023">"Network not found"</string> - <string name="wifi_eap_error_message_code_32760" msgid="2272296327034079386">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32760"</string> - <string name="wifi_eap_error_message_code_32761" msgid="3110197168451423384">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32761"</string> - <string name="wifi_eap_error_message_code_32762" msgid="3515553222282833794">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32762"</string> - <string name="wifi_eap_error_message_code_32763" msgid="3790937365887990781">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32763"</string> - <string name="wifi_eap_error_message_code_32764" msgid="6883041845648321423">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32764"</string> - <string name="wifi_eap_error_message_code_32765" msgid="3134805513440435314">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32765"</string> - <string name="wifi_eap_error_message_code_32766" msgid="6907401733158262194">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32766"</string> - <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="3145323037688670043">"Hotspot turned off"</string> - <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="5136282560556465701">"No devices connected. Tap to modify."</string> - <string name="wifi_sim_required_title" msgid="8362843050699015640">"Wi‑Fi disconnected"</string> - <string name="wifi_sim_required_message" msgid="6085636103482409595">"To connect to <xliff:g id="SSID">%1$s</xliff:g>, insert a <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM"</string> -</resources> diff --git a/service/res/values-fa/strings.xml b/service/res/values-fa/strings.xml index 64ee006f4..739b5c4ff 100644 --- a/service/res/values-fa/strings.xml +++ b/service/res/values-fa/strings.xml @@ -70,13 +70,13 @@ <string name="wifi_disable_mac_randomization_dialog_success" msgid="7288972191769783828">"تنظیم بهروزرسانی شد. دوباره متصل شوید."</string> <string name="wifi_disable_mac_randomization_dialog_failure" msgid="1823128152758990275">"تنظیم حریمخصوصی تغییر نکرد"</string> <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="2352188098110676023">"شبکهای پیدا نشد"</string> - <string name="wifi_eap_error_message_code_32760" msgid="2272296327034079386">"<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۰ احراز هویت EAP"</string> - <string name="wifi_eap_error_message_code_32761" msgid="3110197168451423384">"<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۱ احراز هویت EAP"</string> - <string name="wifi_eap_error_message_code_32762" msgid="3515553222282833794">"<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۲ احراز هویت EAP"</string> - <string name="wifi_eap_error_message_code_32763" msgid="3790937365887990781">"<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۳ احراز هویت EAP"</string> - <string name="wifi_eap_error_message_code_32764" msgid="6883041845648321423">"<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۴ احراز هویت EAP"</string> - <string name="wifi_eap_error_message_code_32765" msgid="3134805513440435314">"<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۵ احراز هویت EAP"</string> - <string name="wifi_eap_error_message_code_32766" msgid="6907401733158262194">"<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۶ احراز هویت EAP"</string> + <string name="wifi_eap_error_message_code_32760" msgid="2272296327034079386">"<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۰ اصالتسنجی EAP"</string> + <string name="wifi_eap_error_message_code_32761" msgid="3110197168451423384">"<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۱ اصالتسنجی EAP"</string> + <string name="wifi_eap_error_message_code_32762" msgid="3515553222282833794">"<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۲ اصالتسنجی EAP"</string> + <string name="wifi_eap_error_message_code_32763" msgid="3790937365887990781">"<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۳ اصالتسنجی EAP"</string> + <string name="wifi_eap_error_message_code_32764" msgid="6883041845648321423">"<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۴ اصالتسنجی EAP"</string> + <string name="wifi_eap_error_message_code_32765" msgid="3134805513440435314">"<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۵ اصالتسنجی EAP"</string> + <string name="wifi_eap_error_message_code_32766" msgid="6907401733158262194">"<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۶ اصالتسنجی EAP"</string> <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="3145323037688670043">"نقطه اتصال خاموش شد"</string> <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="5136282560556465701">"هیچ دستگاهی متصل نیست. برای اصلاح ضربه بزنید."</string> <string name="wifi_sim_required_title" msgid="8362843050699015640">"Wi-Fi قطع شد."</string> diff --git a/service/res/values-gu/strings.xml b/service/res/values-gu/strings.xml index 4a5899b7f..facd8427a 100644 --- a/service/res/values-gu/strings.xml +++ b/service/res/values-gu/strings.xml @@ -39,10 +39,10 @@ <string name="wifi_suggestion_imsi_privacy_exemption_confirmation_content" msgid="1665277613133133730">"જો તમે કનેક્ટ કરો છો, તો <xliff:g id="CARRIERNAME">%s</xliff:g> વાઇ-ફાઇ નેટવર્ક, તમારા SIM સાથે સંકળાયેલા અજોડ IDને ઍક્સેસ અથવા શેર કરી શકે છે. આમ કરવાથી તમારા ડિવાઇસનું સ્થાન ટ્રૅક કરવાની મંજૂરી આપવામાં આવી શકે છે."</string> <string name="wifi_suggestion_action_allow_imsi_privacy_exemption_confirmation" msgid="3102046304611708608">"કનેક્ટ કરો"</string> <string name="wifi_suggestion_action_disallow_imsi_privacy_exemption_confirmation" msgid="8467281276632253246">"કનેક્ટ કરશો નહીં"</string> - <string name="wifi_wakeup_onboarding_title" msgid="8825510461478671504">"વાઇ-ફાઇ આપમેળે ચાલુ થઈ જશે"</string> + <string name="wifi_wakeup_onboarding_title" msgid="8825510461478671504">"વાઇ-ફાઇ ઑટોમૅટિક રીતે ચાલુ થઈ જશે"</string> <string name="wifi_wakeup_onboarding_subtext" msgid="2525097093651287599">"જ્યારે તમે એક ઉચ્ચ ક્વૉલિટીવાળા સાચવેલ નેટવર્કની નજીક હોવ"</string> <string name="wifi_wakeup_onboarding_action_disable" msgid="672002169958868470">"પાછું ચાલુ કરશો નહીં"</string> - <string name="wifi_wakeup_enabled_title" msgid="7758584632765597662">"વાઇ-ફાઇ આપમેળે ચાલુ થયું"</string> + <string name="wifi_wakeup_enabled_title" msgid="7758584632765597662">"વાઇ-ફાઇ ઑટોમૅટિક રીતે ચાલુ થયું"</string> <string name="wifi_wakeup_enabled_content" msgid="4713038331224656338">"તમે એક સાચવેલ નેટવર્કની નજીકમાં છો: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string> <string name="wifi_watchdog_network_disabled" msgid="688248897654073438">"વાઇ-ફાઇ સાથે કનેક્ટ કરી શકાયું નથી"</string> <string name="wifi_watchdog_network_disabled_detailed" msgid="2946200607682633112">" આમનું ઇન્ટરનેટ કનેક્શન નબળું છે."</string> diff --git a/service/res/values-iw/strings.xml b/service/res/values-iw/strings.xml index d7ceddd9c..ad8fc46d9 100644 --- a/service/res/values-iw/strings.xml +++ b/service/res/values-iw/strings.xml @@ -77,7 +77,7 @@ <string name="wifi_eap_error_message_code_32764" msgid="6883041845648321423">"<xliff:g id="SSID">%1$s</xliff:g> : שגיאה 32764 באימות EAP"</string> <string name="wifi_eap_error_message_code_32765" msgid="3134805513440435314">"<xliff:g id="SSID">%1$s</xliff:g> : שגיאה 32765 באימות EAP"</string> <string name="wifi_eap_error_message_code_32766" msgid="6907401733158262194">"<xliff:g id="SSID">%1$s</xliff:g> : שגיאה 32766 באימות EAP"</string> - <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="3145323037688670043">"נקודה לשיתוף אינטרנט נכבתה"</string> + <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="3145323037688670043">"נקודת האינטרנט (hotspot) נכבתה"</string> <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="5136282560556465701">"אין מכשירים מחוברים. יש להקיש כדי לשנות."</string> <string name="wifi_sim_required_title" msgid="8362843050699015640">"Wi-Fi מנותק"</string> <string name="wifi_sim_required_message" msgid="6085636103482409595">"יש להכניס SIM של <xliff:g id="CARRIER_NAME">%2$s</xliff:g> כדי להתחבר אל <xliff:g id="SSID">%1$s</xliff:g>"</string> diff --git a/service/res/values-mcc310-mnc004-b+sr+Latn/strings.xml b/service/res/values-mcc310-mnc004-b+sr+Latn/strings.xml index 4f7ce68d7..5ab12b1f7 100644 --- a/service/res/values-mcc310-mnc004-b+sr+Latn/strings.xml +++ b/service/res/values-mcc310-mnc004-b+sr+Latn/strings.xml @@ -16,11 +16,11 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="wifi_eap_error_message_code_32760" msgid="2026634652595949365">"<xliff:g id="SSID">%1$s</xliff:g> : Ne možete da se povežete na Verizon Wi-Fi Access van oblasti koju Verizon pokriva."</string> - <string name="wifi_eap_error_message_code_32761" msgid="360877194229909012">"<xliff:g id="SSID">%1$s</xliff:g> : Niste pretplaćeni na Verizon Wi-Fi Access. Pozovite nas na 800 922 0204."</string> - <string name="wifi_eap_error_message_code_32762" msgid="7728639390217187188">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema u vezi sa Verizon Wi-Fi Access nalogom. Pozovite nas na 800 922 0204."</string> - <string name="wifi_eap_error_message_code_32763" msgid="4245525855163845749">"<xliff:g id="SSID">%1$s</xliff:g> : Već ste povezani na Verizon Wi-Fi Access."</string> - <string name="wifi_eap_error_message_code_32764" msgid="7837099889588693332">"<xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon Wi-Fi Access. Pozovite nas na 800 922 0204."</string> - <string name="wifi_eap_error_message_code_32765" msgid="1430902733213412544">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema u vezi sa Verizon Wi-Fi Access nalogom. Pozovite nas na 800 922 0204."</string> - <string name="wifi_eap_error_message_code_32766" msgid="3201380662092880364">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access nije dostupan sa vaše lokacije. Probajte ponovo kasnije ili probajte sa neke druge lokacije."</string> + <string name="wifi_eap_error_message_code_32760" msgid="2026634652595949365">"<xliff:g id="SSID">%1$s</xliff:g> : Ne možete da se povežete na Verizon WiFi Access van oblasti koju Verizon pokriva."</string> + <string name="wifi_eap_error_message_code_32761" msgid="360877194229909012">"<xliff:g id="SSID">%1$s</xliff:g> : Niste pretplaćeni na Verizon WiFi Access. Pozovite nas na 800 922 0204."</string> + <string name="wifi_eap_error_message_code_32762" msgid="7728639390217187188">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema u vezi sa Verizon WiFi Access nalogom. Pozovite nas na 800 922 0204."</string> + <string name="wifi_eap_error_message_code_32763" msgid="4245525855163845749">"<xliff:g id="SSID">%1$s</xliff:g> : Već ste povezani na Verizon WiFi Access."</string> + <string name="wifi_eap_error_message_code_32764" msgid="7837099889588693332">"<xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon WiFi Access. Pozovite nas na 800 922 0204."</string> + <string name="wifi_eap_error_message_code_32765" msgid="1430902733213412544">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema u vezi sa Verizon WiFi Access nalogom. Pozovite nas na 800 922 0204."</string> + <string name="wifi_eap_error_message_code_32766" msgid="3201380662092880364">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon WiFi Access nije dostupan sa vaše lokacije. Probajte ponovo kasnije ili probajte sa neke druge lokacije."</string> </resources> diff --git a/service/res/values-mcc310-mnc004-en-rXC/strings.xml b/service/res/values-mcc310-mnc004-en-rXC/strings.xml deleted file mode 100644 index cf47a174e..000000000 --- a/service/res/values-mcc310-mnc004-en-rXC/strings.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright (C) 2020 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="wifi_eap_error_message_code_32760" msgid="2026634652595949365">"<xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi Access from outside the Verizon coverage area."</string> - <string name="wifi_eap_error_message_code_32761" msgid="360877194229909012">"<xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi Access. Please call us at 800-922-0204."</string> - <string name="wifi_eap_error_message_code_32762" msgid="7728639390217187188">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204."</string> - <string name="wifi_eap_error_message_code_32763" msgid="4245525855163845749">"<xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi Access."</string> - <string name="wifi_eap_error_message_code_32764" msgid="7837099889588693332">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi Access. Please call us at 800-922-0204."</string> - <string name="wifi_eap_error_message_code_32765" msgid="1430902733213412544">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204."</string> - <string name="wifi_eap_error_message_code_32766" msgid="3201380662092880364">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access is not available from your location. Try again later or try from a different location."</string> -</resources> diff --git a/service/res/values-mcc310-mnc004-sr/strings.xml b/service/res/values-mcc310-mnc004-sr/strings.xml index 7acf5bf48..176e51bb0 100644 --- a/service/res/values-mcc310-mnc004-sr/strings.xml +++ b/service/res/values-mcc310-mnc004-sr/strings.xml @@ -16,11 +16,11 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="wifi_eap_error_message_code_32760" msgid="2026634652595949365">"<xliff:g id="SSID">%1$s</xliff:g> : Не можете да се повежете на Verizon Wi-Fi Access ван области коју Verizon покрива."</string> - <string name="wifi_eap_error_message_code_32761" msgid="360877194229909012">"<xliff:g id="SSID">%1$s</xliff:g> : Нисте претплаћени на Verizon Wi-Fi Access. Позовите нас на 800 922 0204."</string> - <string name="wifi_eap_error_message_code_32762" msgid="7728639390217187188">"<xliff:g id="SSID">%1$s</xliff:g> : Дошло је до проблема у вези са Verizon Wi-Fi Access налогом. Позовите нас на 800 922 0204."</string> - <string name="wifi_eap_error_message_code_32763" msgid="4245525855163845749">"<xliff:g id="SSID">%1$s</xliff:g> : Већ сте повезани на Verizon Wi-Fi Access."</string> - <string name="wifi_eap_error_message_code_32764" msgid="7837099889588693332">"<xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon Wi-Fi Access. Позовите нас на 800 922 0204."</string> - <string name="wifi_eap_error_message_code_32765" msgid="1430902733213412544">"<xliff:g id="SSID">%1$s</xliff:g> : Дошло је до проблема у вези са Verizon Wi-Fi Access налогом. Позовите нас на 800 922 0204."</string> - <string name="wifi_eap_error_message_code_32766" msgid="3201380662092880364">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access није доступан са ваше локације. Пробајте поново касније или пробајте са неке друге локације."</string> + <string name="wifi_eap_error_message_code_32760" msgid="2026634652595949365">"<xliff:g id="SSID">%1$s</xliff:g> : Не можете да се повежете на Verizon WiFi Access ван области коју Verizon покрива."</string> + <string name="wifi_eap_error_message_code_32761" msgid="360877194229909012">"<xliff:g id="SSID">%1$s</xliff:g> : Нисте претплаћени на Verizon WiFi Access. Позовите нас на 800 922 0204."</string> + <string name="wifi_eap_error_message_code_32762" msgid="7728639390217187188">"<xliff:g id="SSID">%1$s</xliff:g> : Дошло је до проблема у вези са Verizon WiFi Access налогом. Позовите нас на 800 922 0204."</string> + <string name="wifi_eap_error_message_code_32763" msgid="4245525855163845749">"<xliff:g id="SSID">%1$s</xliff:g> : Већ сте повезани на Verizon WiFi Access."</string> + <string name="wifi_eap_error_message_code_32764" msgid="7837099889588693332">"<xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon WiFi Access. Позовите нас на 800 922 0204."</string> + <string name="wifi_eap_error_message_code_32765" msgid="1430902733213412544">"<xliff:g id="SSID">%1$s</xliff:g> : Дошло је до проблема у вези са Verizon WiFi Access налогом. Позовите нас на 800 922 0204."</string> + <string name="wifi_eap_error_message_code_32766" msgid="3201380662092880364">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon WiFi Access није доступан са ваше локације. Пробајте поново касније или пробајте са неке друге локације."</string> </resources> diff --git a/service/res/values-mcc311-mnc480-b+sr+Latn/strings.xml b/service/res/values-mcc311-mnc480-b+sr+Latn/strings.xml index df22976c1..712334ed5 100644 --- a/service/res/values-mcc311-mnc480-b+sr+Latn/strings.xml +++ b/service/res/values-mcc311-mnc480-b+sr+Latn/strings.xml @@ -16,11 +16,11 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="wifi_eap_error_message_code_32760" msgid="4555573944292156870">"<xliff:g id="SSID">%1$s</xliff:g> : Ne možete da se povežete na Verizon Wi-Fi Access van oblasti koju Verizon pokriva."</string> - <string name="wifi_eap_error_message_code_32761" msgid="6990683739673245807">"<xliff:g id="SSID">%1$s</xliff:g> : Niste pretplaćeni na Verizon Wi-Fi Access. Pozovite nas na 800 922 0204."</string> - <string name="wifi_eap_error_message_code_32762" msgid="6557033506833966794">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema u vezi sa Verizon Wi-Fi Access nalogom. Pozovite nas na 800 922 0204."</string> - <string name="wifi_eap_error_message_code_32763" msgid="3400795159444109915">"<xliff:g id="SSID">%1$s</xliff:g> : Već ste povezani na Verizon Wi-Fi Access."</string> - <string name="wifi_eap_error_message_code_32764" msgid="1312072776680938826">"<xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon Wi-Fi Access. Pozovite nas na 800 922 0204."</string> - <string name="wifi_eap_error_message_code_32765" msgid="8150337243297471644">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema u vezi sa Verizon Wi-Fi Access nalogom. Pozovite nas na 800 922 0204."</string> - <string name="wifi_eap_error_message_code_32766" msgid="962325801073733226">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access nije dostupan sa vaše lokacije. Probajte ponovo kasnije ili probajte sa neke druge lokacije."</string> + <string name="wifi_eap_error_message_code_32760" msgid="4555573944292156870">"<xliff:g id="SSID">%1$s</xliff:g> : Ne možete da se povežete na Verizon WiFi Access van oblasti koju Verizon pokriva."</string> + <string name="wifi_eap_error_message_code_32761" msgid="6990683739673245807">"<xliff:g id="SSID">%1$s</xliff:g> : Niste pretplaćeni na Verizon WiFi Access. Pozovite nas na 800 922 0204."</string> + <string name="wifi_eap_error_message_code_32762" msgid="6557033506833966794">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema u vezi sa Verizon WiFi Access nalogom. Pozovite nas na 800 922 0204."</string> + <string name="wifi_eap_error_message_code_32763" msgid="3400795159444109915">"<xliff:g id="SSID">%1$s</xliff:g> : Već ste povezani na Verizon WiFi Access."</string> + <string name="wifi_eap_error_message_code_32764" msgid="1312072776680938826">"<xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon WiFi Access. Pozovite nas na 800 922 0204."</string> + <string name="wifi_eap_error_message_code_32765" msgid="8150337243297471644">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema u vezi sa Verizon WiFi Access nalogom. Pozovite nas na 800 922 0204."</string> + <string name="wifi_eap_error_message_code_32766" msgid="962325801073733226">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon WiFi Access nije dostupan sa vaše lokacije. Probajte ponovo kasnije ili probajte sa neke druge lokacije."</string> </resources> diff --git a/service/res/values-mcc311-mnc480-en-rXC/strings.xml b/service/res/values-mcc311-mnc480-en-rXC/strings.xml deleted file mode 100644 index 78f49226c..000000000 --- a/service/res/values-mcc311-mnc480-en-rXC/strings.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright (C) 2020 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - -<resources xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="wifi_eap_error_message_code_32760" msgid="4555573944292156870">"<xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi Access from outside the Verizon coverage area."</string> - <string name="wifi_eap_error_message_code_32761" msgid="6990683739673245807">"<xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi Access. Please call us at 800-922-0204."</string> - <string name="wifi_eap_error_message_code_32762" msgid="6557033506833966794">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204."</string> - <string name="wifi_eap_error_message_code_32763" msgid="3400795159444109915">"<xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi Access."</string> - <string name="wifi_eap_error_message_code_32764" msgid="1312072776680938826">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi Access. Please call us at 800-922-0204."</string> - <string name="wifi_eap_error_message_code_32765" msgid="8150337243297471644">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204."</string> - <string name="wifi_eap_error_message_code_32766" msgid="962325801073733226">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access is not available from your location. Try again later or try from a different location."</string> -</resources> diff --git a/service/res/values-mcc311-mnc480-sr/strings.xml b/service/res/values-mcc311-mnc480-sr/strings.xml index 49c8d474d..05b637a8a 100644 --- a/service/res/values-mcc311-mnc480-sr/strings.xml +++ b/service/res/values-mcc311-mnc480-sr/strings.xml @@ -16,11 +16,11 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="wifi_eap_error_message_code_32760" msgid="4555573944292156870">"<xliff:g id="SSID">%1$s</xliff:g> : Не можете да се повежете на Verizon Wi-Fi Access ван области коју Verizon покрива."</string> - <string name="wifi_eap_error_message_code_32761" msgid="6990683739673245807">"<xliff:g id="SSID">%1$s</xliff:g> : Нисте претплаћени на Verizon Wi-Fi Access. Позовите нас на 800 922 0204."</string> - <string name="wifi_eap_error_message_code_32762" msgid="6557033506833966794">"<xliff:g id="SSID">%1$s</xliff:g> : Дошло је до проблема у вези са Verizon Wi-Fi Access налогом. Позовите нас на 800 922 0204."</string> - <string name="wifi_eap_error_message_code_32763" msgid="3400795159444109915">"<xliff:g id="SSID">%1$s</xliff:g> : Већ сте повезани на Verizon Wi-Fi Access."</string> - <string name="wifi_eap_error_message_code_32764" msgid="1312072776680938826">"<xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon Wi-Fi Access. Позовите нас на 800 922 0204."</string> - <string name="wifi_eap_error_message_code_32765" msgid="8150337243297471644">"<xliff:g id="SSID">%1$s</xliff:g> : Дошло је до проблема у вези са Verizon Wi-Fi Access налогом. Позовите нас на 800 922 0204."</string> - <string name="wifi_eap_error_message_code_32766" msgid="962325801073733226">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access није доступан са ваше локације. Пробајте поново касније или пробајте са неке друге локације."</string> + <string name="wifi_eap_error_message_code_32760" msgid="4555573944292156870">"<xliff:g id="SSID">%1$s</xliff:g> : Не можете да се повежете на Verizon WiFi Access ван области коју Verizon покрива."</string> + <string name="wifi_eap_error_message_code_32761" msgid="6990683739673245807">"<xliff:g id="SSID">%1$s</xliff:g> : Нисте претплаћени на Verizon WiFi Access. Позовите нас на 800 922 0204."</string> + <string name="wifi_eap_error_message_code_32762" msgid="6557033506833966794">"<xliff:g id="SSID">%1$s</xliff:g> : Дошло је до проблема у вези са Verizon WiFi Access налогом. Позовите нас на 800 922 0204."</string> + <string name="wifi_eap_error_message_code_32763" msgid="3400795159444109915">"<xliff:g id="SSID">%1$s</xliff:g> : Већ сте повезани на Verizon WiFi Access."</string> + <string name="wifi_eap_error_message_code_32764" msgid="1312072776680938826">"<xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon WiFi Access. Позовите нас на 800 922 0204."</string> + <string name="wifi_eap_error_message_code_32765" msgid="8150337243297471644">"<xliff:g id="SSID">%1$s</xliff:g> : Дошло је до проблема у вези са Verizon WiFi Access налогом. Позовите нас на 800 922 0204."</string> + <string name="wifi_eap_error_message_code_32766" msgid="962325801073733226">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon WiFi Access није доступан са ваше локације. Пробајте поново касније или пробајте са неке друге локације."</string> </resources> diff --git a/service/res/values-mk/strings.xml b/service/res/values-mk/strings.xml index ddf36bb1f..836a82303 100644 --- a/service/res/values-mk/strings.xml +++ b/service/res/values-mk/strings.xml @@ -20,7 +20,7 @@ <string name="wifi_available_title" msgid="2844963247498642107">"Поврзете се на отворена Wi‑Fi-мрежа"</string> <string name="wifi_available_title_connecting" msgid="4308431577637294026">"Поврзување со Wi-Fi мрежа"</string> <string name="wifi_available_title_connected" msgid="922603556292157664">"Се поврзавте на Wi‑Fi-мрежа"</string> - <string name="wifi_available_title_failed_to_connect" msgid="2304443371893419545">"Не можеше да се поврзе на Wi‑Fi-мрежа"</string> + <string name="wifi_available_title_failed_to_connect" msgid="2304443371893419545">"Не може да се поврзе на Wi‑Fi-мрежа"</string> <string name="wifi_available_content_failed_to_connect" msgid="3171283790496729136">"Допрете за да ги видите сите мрежи"</string> <string name="wifi_available_action_connect" msgid="7989951293406720158">"Поврзете се"</string> <string name="wifi_available_action_all_networks" msgid="2616926772813472478">"Сите мрежи"</string> @@ -44,7 +44,7 @@ <string name="wifi_wakeup_onboarding_action_disable" msgid="672002169958868470">"Не вклучувај повторно"</string> <string name="wifi_wakeup_enabled_title" msgid="7758584632765597662">"Wi‑Fi се вклучи автоматски"</string> <string name="wifi_wakeup_enabled_content" msgid="4713038331224656338">"Близу сте до зачувана мрежа: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string> - <string name="wifi_watchdog_network_disabled" msgid="688248897654073438">"Не можеше да се поврзе со Wi-Fi"</string> + <string name="wifi_watchdog_network_disabled" msgid="688248897654073438">"Не може да се поврзе на Wi-Fi"</string> <string name="wifi_watchdog_network_disabled_detailed" msgid="2946200607682633112">" има слаба интернет-врска."</string> <string name="wifi_connect_alert_title" msgid="6144470472092017636">"Дозволете поврзување?"</string> <string name="wifi_connect_alert_message" msgid="3123801378559831220">"Апликацијата %1$s сака да се поврзе со Wifi-мрежата %2$s"</string> diff --git a/service/res/values-sr/strings.xml b/service/res/values-sr/strings.xml index fb4009383..74bf98238 100644 --- a/service/res/values-sr/strings.xml +++ b/service/res/values-sr/strings.xml @@ -16,9 +16,9 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="wifiResourcesAppLabel" product="default" msgid="4965162975090543792">"Системски Wi-Fi ресурси"</string> + <string name="wifiResourcesAppLabel" product="default" msgid="4965162975090543792">"Системски WiFi ресурси"</string> <string name="wifi_available_title" msgid="2844963247498642107">"Повежите се са отвореном Wi‑Fi мрежом"</string> - <string name="wifi_available_title_connecting" msgid="4308431577637294026">"Повезује се са Wi-Fi мрежом..."</string> + <string name="wifi_available_title_connecting" msgid="4308431577637294026">"Повезује се са WiFi мрежом..."</string> <string name="wifi_available_title_connected" msgid="922603556292157664">"Повезали сте се са Wi‑Fi мрежом"</string> <string name="wifi_available_title_failed_to_connect" msgid="2304443371893419545">"Повезивање са Wi‑Fi мрежом није успело"</string> <string name="wifi_available_content_failed_to_connect" msgid="3171283790496729136">"Додирните да бисте видели све мреже"</string> @@ -31,7 +31,7 @@ <string name="wifi_suggestion_content" msgid="7796523101671166285">"Мреже које предлаже <xliff:g id="NAME">%s</xliff:g>. Уређај ће се можда повезати аутоматски."</string> <string name="wifi_suggestion_action_allow_app" msgid="1269853856167682235">"Дозволи"</string> <string name="wifi_suggestion_action_disallow_app" msgid="4844316521687534924">"Не, хвала"</string> - <string name="wifi_suggestion_imsi_privacy_title" msgid="442867569519352918">"Желите да се повежете на Wi-Fi мрежу <xliff:g id="CARRIERNAME">%s</xliff:g>?"</string> + <string name="wifi_suggestion_imsi_privacy_title" msgid="442867569519352918">"Желите да се повежете на WiFi мрежу <xliff:g id="CARRIERNAME">%s</xliff:g>?"</string> <string name="wifi_suggestion_imsi_privacy_content" msgid="6631744859477949328">"Ове мреже добијају ИД SIM картице који може да се користи за праћење локације уређаја"</string> <string name="wifi_suggestion_action_allow_imsi_privacy_exemption_carrier" msgid="6445286383390779291">"Повежи"</string> <string name="wifi_suggestion_action_disallow_imsi_privacy_exemption_carrier" msgid="1466870675651864648">"Не повезуј"</string> @@ -44,10 +44,10 @@ <string name="wifi_wakeup_onboarding_action_disable" msgid="672002169958868470">"Не укључуј поново"</string> <string name="wifi_wakeup_enabled_title" msgid="7758584632765597662">"Wi‑Fi је аутоматски укључен"</string> <string name="wifi_wakeup_enabled_content" msgid="4713038331224656338">"У близини сте сачуване мреже: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string> - <string name="wifi_watchdog_network_disabled" msgid="688248897654073438">"Није могуће повезати са Wi-Fi мрежом"</string> + <string name="wifi_watchdog_network_disabled" msgid="688248897654073438">"Није могуће повезати са WiFi мрежом"</string> <string name="wifi_watchdog_network_disabled_detailed" msgid="2946200607682633112">" има лошу интернет везу."</string> <string name="wifi_connect_alert_title" msgid="6144470472092017636">"Желите ли да дозволите повезивање?"</string> - <string name="wifi_connect_alert_message" msgid="3123801378559831220">"Апликација %1$s жели да се повеже на Wi-Fi мрежу %2$s"</string> + <string name="wifi_connect_alert_message" msgid="3123801378559831220">"Апликација %1$s жели да се повеже на WiFi мрежу %2$s"</string> <string name="wifi_connect_default_application" msgid="6164721692891325243">"Апликација"</string> <string name="accept" msgid="5931271886782610829">"Прихвати"</string> <string name="decline" msgid="6874256900873707640">"Одбиј"</string> @@ -58,9 +58,9 @@ <string name="wifi_p2p_to_message" msgid="6664932426704362946">"Коме:"</string> <string name="wifi_p2p_enter_pin_message" msgid="5661843905965463456">"Унесите потребни PIN:"</string> <string name="wifi_p2p_show_pin_message" msgid="4332876077723766909">"PIN:"</string> - <string name="wifi_p2p_frequency_conflict_message" product="tablet" msgid="3372859876274663802">"Таблет ће привремено прекинути везу са Wi-Fi-јем док је повезан са уређајем <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string> - <string name="wifi_p2p_frequency_conflict_message" product="tv" msgid="406603193215934517">"Android TV уређај ће привремено прекинути везу са Wi-Fi мрежом док је повезан са уређајем <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string> - <string name="wifi_p2p_frequency_conflict_message" product="default" msgid="2723785832319900478">"Телефон ће привремено прекинути везу са Wi-Fi-јем док је повезан са уређајем <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string> + <string name="wifi_p2p_frequency_conflict_message" product="tablet" msgid="3372859876274663802">"Таблет ће привремено прекинути везу са WiFi-ем док је повезан са уређајем <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string> + <string name="wifi_p2p_frequency_conflict_message" product="tv" msgid="406603193215934517">"Android TV уређај ће привремено прекинути везу са WiFi мрежом док је повезан са уређајем <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string> + <string name="wifi_p2p_frequency_conflict_message" product="default" msgid="2723785832319900478">"Телефон ће привремено прекинути везу са WiFi-ем док је повезан са уређајем <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string> <string name="dlg_ok" msgid="3250085870426030310">"Потврди"</string> <string name="wifi_cannot_connect_with_randomized_mac_title" msgid="3161171832972320854">"Повезивање на мрежу <xliff:g id="SSID">%1$s</xliff:g> није успело"</string> <string name="wifi_cannot_connect_with_randomized_mac_message" msgid="3084495849409387375">"Додирните да бисте променили подешавања приватности и пробали поново"</string> @@ -79,6 +79,6 @@ <string name="wifi_eap_error_message_code_32766" msgid="6907401733158262194">"<xliff:g id="SSID">%1$s</xliff:g>: EAP грешка при потврди идентитета 32766"</string> <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="3145323037688670043">"Хотспот је искључен"</string> <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="5136282560556465701">"Ниједан уређај није повезан. Додирните да бисте изменили."</string> - <string name="wifi_sim_required_title" msgid="8362843050699015640">"Wi-Fi веза је прекинута"</string> - <string name="wifi_sim_required_message" msgid="6085636103482409595">"Да бисте се повезали на мрежу <xliff:g id="SSID">%1$s</xliff:g>, уметните <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM картицу"</string> + <string name="wifi_sim_required_title" msgid="8362843050699015640">"WiFi веза је прекинута"</string> + <string name="wifi_sim_required_message" msgid="6085636103482409595">"Да бисте се повезали на мрежу <xliff:g id="SSID">%1$s</xliff:g>, ставите <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM картицу"</string> </resources> diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java index 28fdade18..34567e969 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java @@ -222,6 +222,7 @@ public class WifiConfigManagerTest extends WifiBaseTest { .thenReturn(false); when(mWifiInjector.getMacAddressUtil()).thenReturn(mMacAddressUtil); when(mWifiInjector.getWifiMetrics()).thenReturn(mWifiMetrics); + when(mWifiPermissionsUtil.doesUidBelongToCurrentUser(anyInt())).thenReturn(true); when(mMacAddressUtil.calculatePersistentMac(any(), any())).thenReturn(TEST_RANDOMIZED_MAC); when(mWifiScoreCard.lookupNetwork(any())).thenReturn(mPerNetwork); @@ -2913,6 +2914,8 @@ public class WifiConfigManagerTest extends WifiBaseTest { setupStoreDataForUserRead(user2Networks, new HashMap<>()); // Now switch the user to user 2 and ensure that user 1's private network has been removed. when(mUserManager.isUserUnlockingOrUnlocked(UserHandle.of(user2))).thenReturn(true); + when(mWifiPermissionsUtil.doesUidBelongToCurrentUser(user1Network.creatorUid)) + .thenReturn(false); Set<Integer> removedNetworks = mWifiConfigManager.handleUserSwitch(user2); verify(mWifiConfigStore).switchUserStoresAndRead(any(List.class)); assertTrue((removedNetworks.size() == 1) && (removedNetworks.contains(user1NetworkId))); @@ -3053,7 +3056,7 @@ public class WifiConfigManagerTest extends WifiBaseTest { public void testHandleUserSwitchPushesOtherPrivateNetworksToSharedStore() throws Exception { int user1 = TEST_DEFAULT_USER; int user2 = TEST_DEFAULT_USER + 1; - setupUserProfiles(user2); + setupUserProfiles(user1); int appId = 674; @@ -3091,6 +3094,8 @@ public class WifiConfigManagerTest extends WifiBaseTest { } }; setupStoreDataForUserRead(userNetworks, new HashMap<>()); + when(mWifiPermissionsUtil.doesUidBelongToCurrentUser(user2Network.creatorUid)) + .thenReturn(false); mWifiConfigManager.handleUserUnlock(user1); verify(mWifiConfigStore).switchUserStoresAndRead(any(List.class)); // Capture the written data for the user 1 and ensure that it corresponds to what was @@ -3105,6 +3110,10 @@ public class WifiConfigManagerTest extends WifiBaseTest { // Now switch the user to user2 and ensure that user 2's private network has been moved to // the user store. when(mUserManager.isUserUnlockingOrUnlocked(UserHandle.of(user2))).thenReturn(true); + when(mWifiPermissionsUtil.doesUidBelongToCurrentUser(user1Network.creatorUid)) + .thenReturn(true).thenReturn(false); + when(mWifiPermissionsUtil.doesUidBelongToCurrentUser(user2Network.creatorUid)) + .thenReturn(false).thenReturn(true); mWifiConfigManager.handleUserSwitch(user2); // Set the expected network list before comparing. user1Network should be in shared data. // Note: In the real world, user1Network will no longer be visible now because it should @@ -3169,6 +3178,8 @@ public class WifiConfigManagerTest extends WifiBaseTest { // Unlock the owner of the legacy Passpoint configuration, verify it is removed from // the configured networks (migrated to PasspointManager). setupStoreDataForUserRead(new ArrayList<WifiConfiguration>(), new HashMap<>()); + when(mWifiPermissionsUtil.doesUidBelongToCurrentUser(passpointConfig.creatorUid)) + .thenReturn(false); mWifiConfigManager.handleUserUnlock(user1); verify(mWifiConfigStore).switchUserStoresAndRead(any(List.class)); Pair<List<WifiConfiguration>, List<WifiConfiguration>> writtenNetworkList = @@ -3296,7 +3307,8 @@ public class WifiConfigManagerTest extends WifiBaseTest { // Ensure that we have 2 networks in the database before the stop. assertEquals(2, mWifiConfigManager.getConfiguredNetworks().size()); - + when(mWifiPermissionsUtil.doesUidBelongToCurrentUser(user1Network.creatorUid)) + .thenReturn(false); mWifiConfigManager.handleUserStop(user1); // Ensure that we only have 1 shared network in the database after the stop. @@ -3498,6 +3510,7 @@ public class WifiConfigManagerTest extends WifiBaseTest { int creatorUid = UserHandle.getUid(user2, 674); when(mWifiPermissionsUtil.checkNetworkSettingsPermission(creatorUid)).thenReturn(false); + when(mWifiPermissionsUtil.doesUidBelongToCurrentUser(creatorUid)).thenReturn(false); // Create a network for user2 try adding it. This should be rejected. final WifiConfiguration user2Network = WifiConfigurationTestUtil.createPskNetwork(); diff --git a/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java index 38a0026df..fd27dcc06 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java @@ -66,6 +66,7 @@ import android.net.wifi.hotspot2.pps.HomeSp; import android.os.Handler; import android.os.IBinder; import android.os.UserHandle; +import android.os.UserManager; import android.os.test.TestLooper; import android.telephony.TelephonyManager; import android.test.suitebuilder.annotation.SmallTest; @@ -150,6 +151,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { private @Mock Notification.Builder mNotificationBuilder; private @Mock Notification mNotification; private @Mock LruConnectionTracker mLruConnectionTracker; + private @Mock UserManager mUserManager; private TestLooper mLooper; private ArgumentCaptor<AppOpsManager.OnOpChangedListener> mAppOpChangedListenerCaptor = ArgumentCaptor.forClass(AppOpsManager.OnOpChangedListener.class); @@ -216,6 +218,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { when(mActivityManager.isLowRamDevice()).thenReturn(false); when(mActivityManager.getPackageImportance(any())).thenReturn( IMPORTANCE_FOREGROUND_SERVICE); + when(mWifiPermissionsUtil.doesUidBelongToCurrentUser(anyInt())).thenReturn(true); // setup resource strings for notification. when(mResources.getString(eq(R.string.wifi_suggestion_title), anyString())) @@ -560,7 +563,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { TEST_PACKAGE_1, TEST_FEATURE)); assertEquals(WifiConfiguration.METERED_OVERRIDE_METERED, mWifiNetworkSuggestionsManager - .get(TEST_PACKAGE_1).get(0).wifiConfiguration.meteredOverride); + .get(TEST_PACKAGE_1, TEST_UID_1).get(0).wifiConfiguration.meteredOverride); // Verify we did not update config in WCM. verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(), anyInt(), any()); } @@ -607,7 +610,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { TEST_PACKAGE_1, TEST_FEATURE)); assertEquals(WifiConfiguration.METERED_OVERRIDE_METERED, mWifiNetworkSuggestionsManager - .get(TEST_PACKAGE_1).get(0).wifiConfiguration.meteredOverride); + .get(TEST_PACKAGE_1, TEST_UID_1).get(0).wifiConfiguration.meteredOverride); verify(mWifiMetrics, never()).incrementNetworkSuggestionApiUsageNumOfAppInType(anyInt()); // Verify we did update config in WCM. ArgumentCaptor<WifiConfiguration> configCaptor = @@ -1066,7 +1069,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { public void testOnNetworkConnectionSuccessWithOneMatch() throws Exception { assertTrue(mWifiNetworkSuggestionsManager .registerSuggestionConnectionStatusListener(mBinder, mListener, - NETWORK_CALLBACK_ID, TEST_PACKAGE_1)); + NETWORK_CALLBACK_ID, TEST_PACKAGE_1, TEST_UID_1)); WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion( WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true); List<WifiNetworkSuggestion> networkSuggestionList = @@ -1103,7 +1106,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { public void testOnNetworkConnectionSuccessWithOneMatchFromCarrierPrivilegedApp() { assertTrue(mWifiNetworkSuggestionsManager .registerSuggestionConnectionStatusListener(mBinder, mListener, - NETWORK_CALLBACK_ID, TEST_PACKAGE_1)); + NETWORK_CALLBACK_ID, TEST_PACKAGE_1, TEST_UID_1)); when(mWifiCarrierInfoManager.getCarrierIdForPackageWithCarrierPrivileges(TEST_PACKAGE_1)) .thenReturn(TEST_CARRIER_ID); WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion( @@ -1138,6 +1141,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { mWifiNetworkSuggestionsManager.remove(networkSuggestionList, TEST_UID_1, TEST_PACKAGE_1)); verify(mWifiConfigManager).removeSuggestionConfiguredNetwork(anyString()); + mInorder.verify(mWifiPermissionsUtil).doesUidBelongToCurrentUser(eq(TEST_UID_1)); // Verify no more broadcast were sent out. mInorder.verifyNoMoreInteractions(); @@ -1152,7 +1156,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { public void testOnSavedOpenNetworkConnectionSuccessWithMultipleMatch() throws Exception { assertTrue(mWifiNetworkSuggestionsManager .registerSuggestionConnectionStatusListener(mBinder, mListener, - NETWORK_CALLBACK_ID, TEST_PACKAGE_1)); + NETWORK_CALLBACK_ID, TEST_PACKAGE_1, TEST_UID_1)); when(mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(TEST_UID_1)) .thenReturn(true); WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork(); @@ -1199,7 +1203,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { ArgumentCaptor.forClass(IBinder.DeathRecipient.class); assertTrue(mWifiNetworkSuggestionsManager .registerSuggestionConnectionStatusListener(mBinder, mListener, - NETWORK_CALLBACK_ID, TEST_PACKAGE_1)); + NETWORK_CALLBACK_ID, TEST_PACKAGE_1, TEST_UID_1)); verify(mBinder).linkToDeath(drCaptor.capture(), anyInt()); WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion( WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true); @@ -1249,7 +1253,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { public void testOnNetworkConnectionFailureWithOneMatch() throws Exception { assertTrue(mWifiNetworkSuggestionsManager .registerSuggestionConnectionStatusListener(mBinder, mListener, - NETWORK_CALLBACK_ID, TEST_PACKAGE_1)); + NETWORK_CALLBACK_ID, TEST_PACKAGE_1, TEST_UID_1)); WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion( WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true); List<WifiNetworkSuggestion> networkSuggestionList = @@ -2467,7 +2471,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { public void testGetNetworkSuggestions() { // test App never suggested. List<WifiNetworkSuggestion> storedNetworkSuggestionListPerApp = - mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1); + mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1, TEST_UID_1); assertEquals(storedNetworkSuggestionListPerApp.size(), 0); // App add network suggestions then get stored suggestions. @@ -2489,7 +2493,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { TEST_PACKAGE_1, TEST_FEATURE)); mWifiNetworkSuggestionsManager.setHasUserApprovedForApp(true, TEST_PACKAGE_1); storedNetworkSuggestionListPerApp = - mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1); + mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1, TEST_UID_1); assertEquals(new HashSet<>(networkSuggestionList), new HashSet<>(storedNetworkSuggestionListPerApp)); @@ -2498,7 +2502,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { mWifiNetworkSuggestionsManager.remove(new ArrayList<>(), TEST_UID_1, TEST_PACKAGE_1)); storedNetworkSuggestionListPerApp = - mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1); + mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1, TEST_UID_1); assertEquals(storedNetworkSuggestionListPerApp.size(), 0); } @@ -3222,7 +3226,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { .add(networkSuggestionList, TEST_UID_1, TEST_PACKAGE_1, TEST_FEATURE); assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_NOT_ALLOWED, status); verify(mNotificationManger, never()).notify(anyInt(), any()); - assertEquals(0, mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1).size()); + assertEquals(0, mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1, TEST_UID_1).size()); verify(mWifiMetrics, never()).incrementNetworkSuggestionApiUsageNumOfAppInType(anyInt()); } @@ -3246,7 +3250,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { .add(networkSuggestionList, TEST_UID_1, TEST_PACKAGE_1, TEST_FEATURE); assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS, status); verify(mNotificationManger, never()).notify(anyInt(), any()); - assertEquals(1, mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1).size()); + assertEquals(1, mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1, TEST_UID_1).size()); verify(mWifiMetrics).incrementNetworkSuggestionApiUsageNumOfAppInType( WifiNetworkSuggestionsManager.APP_TYPE_CARRIER_PRIVILEGED); } @@ -3271,7 +3275,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { .add(networkSuggestionList, TEST_UID_1, TEST_PACKAGE_1, TEST_FEATURE); assertEquals(status, WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS); verify(mNotificationManger, never()).notify(anyInt(), any()); - assertEquals(1, mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1).size()); + assertEquals(1, mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1, TEST_UID_1).size()); } /** @@ -3333,7 +3337,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { when(mWifiCarrierInfoManager.getCarrierIdForPackageWithCarrierPrivileges(TEST_PACKAGE_1)) .thenReturn(TelephonyManager.UNKNOWN_CARRIER_ID); mWifiNetworkSuggestionsManager.resetCarrierPrivilegedApps(); - assertEquals(0, mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1).size()); + assertEquals(0, mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1, TEST_UID_1).size()); verify(mWifiConfigManager, times(2)).saveToStore(true); status = mWifiNetworkSuggestionsManager .add(networkSuggestionList, TEST_UID_1, TEST_PACKAGE_1, TEST_FEATURE); @@ -4033,7 +4037,7 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { public void testUnregisterSuggestionConnectionStatusListenerNeverRegistered() { int listenerIdentifier = 1234; mWifiNetworkSuggestionsManager.unregisterSuggestionConnectionStatusListener( - listenerIdentifier, TEST_PACKAGE_1); + listenerIdentifier, TEST_PACKAGE_1, TEST_UID_1); } /** @@ -4084,6 +4088,43 @@ public class WifiNetworkSuggestionsManagerTest extends WifiBaseTest { } /** + * Verify when calling API from background user will fail. + */ + @Test + public void testCallingFromBackgroundUserWillFailed() { + WifiConfiguration wifiConfiguration = WifiConfigurationTestUtil.createOpenNetwork(); + WifiNetworkSuggestion networkSuggestion = new WifiNetworkSuggestion( + wifiConfiguration, null, false, false, true, true); + + assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS, + mWifiNetworkSuggestionsManager.add(Arrays.asList(networkSuggestion), TEST_UID_1, + TEST_PACKAGE_1, TEST_FEATURE)); + // When switch the user to background + when(mWifiPermissionsUtil.doesUidBelongToCurrentUser(TEST_UID_1)).thenReturn(false); + assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_INTERNAL, + mWifiNetworkSuggestionsManager.add(Arrays.asList(networkSuggestion), TEST_UID_1, + TEST_PACKAGE_1, TEST_FEATURE)); + assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_INTERNAL, + mWifiNetworkSuggestionsManager.remove(Arrays.asList(networkSuggestion), TEST_UID_1, + TEST_PACKAGE_1)); + assertTrue(mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1, TEST_UID_1).isEmpty()); + assertFalse(mWifiNetworkSuggestionsManager.registerSuggestionConnectionStatusListener( + mBinder, mListener, NETWORK_CALLBACK_ID, TEST_PACKAGE_1, TEST_UID_1)); + + // When switch the user back to foreground + when(mWifiPermissionsUtil.doesUidBelongToCurrentUser(TEST_UID_1)).thenReturn(true); + assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS, + mWifiNetworkSuggestionsManager.add(Arrays.asList(networkSuggestion), TEST_UID_1, + TEST_PACKAGE_1, TEST_FEATURE)); + assertFalse(mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1, TEST_UID_1).isEmpty()); + assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS, + mWifiNetworkSuggestionsManager.remove(Arrays.asList(networkSuggestion), TEST_UID_1, + TEST_PACKAGE_1)); + assertTrue(mWifiNetworkSuggestionsManager.registerSuggestionConnectionStatusListener( + mBinder, mListener, NETWORK_CALLBACK_ID, TEST_PACKAGE_1, TEST_UID_1)); + } + + /** * Helper function for creating a test configuration with user credential. * * @return {@link PasspointConfiguration} diff --git a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java index 22561a159..c1ddd6321 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java @@ -4592,12 +4592,12 @@ public class WifiServiceImplTest extends WifiBaseTest { @Test public void testGetNetworkSuggestions() { List<WifiNetworkSuggestion> testList = new ArrayList<>(); - when(mWifiNetworkSuggestionsManager.get(anyString())).thenReturn(testList); + when(mWifiNetworkSuggestionsManager.get(anyString(), anyInt())).thenReturn(testList); mLooper.startAutoDispatch(); assertEquals(testList, mWifiServiceImpl.getNetworkSuggestions(TEST_PACKAGE_NAME)); mLooper.stopAutoDispatchAndIgnoreExceptions(); - verify(mWifiNetworkSuggestionsManager).get(eq(TEST_PACKAGE_NAME)); + verify(mWifiNetworkSuggestionsManager).get(eq(TEST_PACKAGE_NAME), anyInt()); } /** @@ -4612,7 +4612,7 @@ public class WifiServiceImplTest extends WifiBaseTest { assertTrue(mWifiServiceImpl.getNetworkSuggestions(TEST_PACKAGE_NAME).isEmpty()); mLooper.stopAutoDispatchAndIgnoreExceptions(); - verify(mWifiNetworkSuggestionsManager, never()).get(eq(TEST_PACKAGE_NAME)); + verify(mWifiNetworkSuggestionsManager, never()).get(eq(TEST_PACKAGE_NAME), anyInt()); } /** @@ -5394,12 +5394,12 @@ public class WifiServiceImplTest extends WifiBaseTest { mLooper.dispatchAll(); verify(mWifiNetworkSuggestionsManager).registerSuggestionConnectionStatusListener( eq(mAppBinder), eq(mSuggestionConnectionStatusListener), eq(NETWORK_CALLBACK_ID), - eq(TEST_PACKAGE_NAME)); + eq(TEST_PACKAGE_NAME), anyInt()); mWifiServiceImpl.unregisterSuggestionConnectionStatusListener(NETWORK_CALLBACK_ID, TEST_PACKAGE_NAME); mLooper.dispatchAll(); verify(mWifiNetworkSuggestionsManager).unregisterSuggestionConnectionStatusListener( - eq(NETWORK_CALLBACK_ID), eq(TEST_PACKAGE_NAME)); + eq(NETWORK_CALLBACK_ID), eq(TEST_PACKAGE_NAME), anyInt()); } diff --git a/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointManagerTest.java b/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointManagerTest.java index 9caf85f4e..cb459728a 100644 --- a/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointManagerTest.java @@ -102,6 +102,7 @@ import com.android.server.wifi.hotspot2.anqp.OsuProviderInfo; import com.android.server.wifi.proto.nano.WifiMetricsProto.UserActionEvent; import com.android.server.wifi.util.InformationElementUtil; import com.android.server.wifi.util.InformationElementUtil.RoamingConsortium; +import com.android.server.wifi.util.WifiPermissionsUtil; import org.junit.Before; import org.junit.Test; @@ -192,6 +193,7 @@ public class PasspointManagerTest extends WifiBaseTest { @Mock SubscriptionManager mSubscriptionManager; @Mock WifiNetworkSuggestionsManager mWifiNetworkSuggestionsManager; @Mock MacAddressUtil mMacAddressUtil; + @Mock WifiPermissionsUtil mWifiPermissionsUtil; Handler mHandler; TestLooper mLooper; @@ -220,6 +222,7 @@ public class PasspointManagerTest extends WifiBaseTest { when(mWifiInjector.getClientModeImpl()).thenReturn(mClientModeImpl); when(mWifiInjector.getWifiNetworkSuggestionsManager()) .thenReturn(mWifiNetworkSuggestionsManager); + when(mWifiPermissionsUtil.doesUidBelongToCurrentUser(anyInt())).thenReturn(true); mWifiCarrierInfoManager = new WifiCarrierInfoManager(mTelephonyManager, mSubscriptionManager, mWifiInjector, mock(FrameworkFacade.class), mock(WifiContext.class), mWifiConfigStore, mock(Handler.class), mWifiMetrics); @@ -227,7 +230,8 @@ public class PasspointManagerTest extends WifiBaseTest { mHandler = new Handler(mLooper.getLooper()); mManager = new PasspointManager(mContext, mWifiInjector, mHandler, mWifiNative, mWifiKeyStore, mClock, mObjectFactory, mWifiConfigManager, - mWifiConfigStore, mWifiMetrics, mWifiCarrierInfoManager, mMacAddressUtil); + mWifiConfigStore, mWifiMetrics, mWifiCarrierInfoManager, mMacAddressUtil, + mWifiPermissionsUtil); ArgumentCaptor<PasspointEventHandler.Callbacks> callbacks = ArgumentCaptor.forClass(PasspointEventHandler.Callbacks.class); verify(mObjectFactory).makePasspointEventHandler(any(WifiNative.class), @@ -524,6 +528,29 @@ public class PasspointManagerTest extends WifiBaseTest { } /** + * Verify that adding a provider from a background user will fail. + * + * @throws Exception + */ + @Test + public void addProviderWithBackgroundUser() throws Exception { + when(mWifiPermissionsUtil.doesUidBelongToCurrentUser(anyInt())).thenReturn(false); + + PasspointConfiguration config = createTestConfigWithUserCredential(TEST_FQDN, + TEST_FRIENDLY_NAME); + PasspointProvider provider = createMockProvider(config); + when(provider.getPackageName()).thenReturn(TEST_PACKAGE); + when(mObjectFactory.makePasspointProvider(eq(config), eq(mWifiKeyStore), + eq(mWifiCarrierInfoManager), anyLong(), eq(TEST_CREATOR_UID), eq(TEST_PACKAGE), + eq(false))).thenReturn(provider); + assertFalse(mManager.addOrUpdateProvider(config, TEST_CREATOR_UID, + TEST_PACKAGE, false, true)); + + verify(mWifiMetrics).incrementNumPasspointProviderInstallation(); + verify(mWifiMetrics, never()).incrementNumPasspointProviderInstallSuccess(); + } + + /** * Verify that adding a user saved provider with a valid configuration and user credential will * succeed. * @@ -753,7 +780,8 @@ public class PasspointManagerTest extends WifiBaseTest { .thenReturn(true); PasspointManager ut = new PasspointManager(mContext, mWifiInjector, mHandler, mWifiNative, mWifiKeyStore, mClock, spyFactory, mWifiConfigManager, - mWifiConfigStore, mWifiMetrics, mWifiCarrierInfoManager, mMacAddressUtil); + mWifiConfigStore, mWifiMetrics, mWifiCarrierInfoManager, mMacAddressUtil, + mWifiPermissionsUtil); assertTrue(ut.addOrUpdateProvider(config, TEST_CREATOR_UID, TEST_PACKAGE, true, true)); @@ -1932,6 +1960,29 @@ public class PasspointManagerTest extends WifiBaseTest { } /** + * Verify that removing a provider from a background user will fail. + * + * @throws Exception + */ + @Test + public void removeProviderWithBackgroundUser() throws Exception { + PasspointConfiguration config = createTestConfigWithUserCredential(TEST_FQDN, + TEST_FRIENDLY_NAME); + PasspointProvider provider = createMockProvider(config); + when(mObjectFactory.makePasspointProvider(eq(config), eq(mWifiKeyStore), + eq(mWifiCarrierInfoManager), anyLong(), eq(TEST_CREATOR_UID), eq(TEST_PACKAGE), + eq(false))).thenReturn(provider); + assertTrue(mManager.addOrUpdateProvider(config, TEST_CREATOR_UID, TEST_PACKAGE, + false, true)); + verifyInstalledConfig(config); + verify(mWifiMetrics).incrementNumPasspointProviderInstallation(); + verify(mWifiMetrics).incrementNumPasspointProviderInstallSuccess(); + + when(mWifiPermissionsUtil.doesUidBelongToCurrentUser(anyInt())).thenReturn(false); + assertFalse(mManager.removeProvider(TEST_CREATOR_UID, false, null, TEST_FQDN)); + } + + /** * Verify that adding a suggestion provider with a valid configuration and user credential will * succeed. * |