diff options
55 files changed, 596 insertions, 76 deletions
diff --git a/service/Android.bp b/service/Android.bp index ade028eae..5baf164bc 100644 --- a/service/Android.bp +++ b/service/Android.bp @@ -73,7 +73,7 @@ cc_library_shared { // Build the wifi-service static library // ============================================================ -java_library { +android_library { name: "wifi-service", installable: true, defaults: ["WifiStackCommon"], @@ -89,6 +89,8 @@ java_library { "services", ], + manifest: "AndroidManifestBase.xml", + static_libs: [ "android.hardware.wifi-V1.0-java", "android.hardware.wifi-V1.1-java", diff --git a/service/AndroidManifest.xml b/service/AndroidManifest.xml index ac6d53aa8..68e4d1ee5 100644 --- a/service/AndroidManifest.xml +++ b/service/AndroidManifest.xml @@ -71,12 +71,9 @@ <application android:persistent="true" - android:directBootAware="true" - android:process="com.android.networkstack.process" - android:label="@string/wifiAppLabel"> + android:process="com.android.networkstack.process"> <service - android:name="com.android.server.wifi.WifiStackService" - android:directBootAware="true"> + android:name="com.android.server.wifi.WifiStackService"> <intent-filter> <action android:name="android.net.wifi.IWifiStackConnector"/> </intent-filter> diff --git a/service/AndroidManifestBase.xml b/service/AndroidManifestBase.xml new file mode 100644 index 000000000..787cd7539 --- /dev/null +++ b/service/AndroidManifestBase.xml @@ -0,0 +1,29 @@ +<?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. + */ +--> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.android.wifi" + android:versionCode="11" + android:versionName="Q-initial"> + <application + android:label="@string/wifiAppLabel" + android:defaultToDeviceProtectedStorage="true" + android:directBootAware="true" + android:usesCleartextTraffic="true"> + </application> +</manifest> diff --git a/service/AndroidManifest_InProcess.xml b/service/AndroidManifest_InProcess.xml index 7d242d928..605c1ee29 100644 --- a/service/AndroidManifest_InProcess.xml +++ b/service/AndroidManifest_InProcess.xml @@ -27,12 +27,9 @@ <application android:persistent="true" - android:directBootAware="true" - android:process="system" - android:label="@string/wifiAppLabel"> + android:process="system"> <service - android:name="com.android.server.wifi.WifiStackService" - android:directBootAware="true"> + android:name="com.android.server.wifi.WifiStackService"> <intent-filter> <action android:name="android.net.wifi.IWifiStackConnector.InProcess"/> </intent-filter> diff --git a/service/java/com/android/server/wifi/ActiveModeWarden.java b/service/java/com/android/server/wifi/ActiveModeWarden.java index 679b62dd4..69f614ee8 100644 --- a/service/java/com/android/server/wifi/ActiveModeWarden.java +++ b/service/java/com/android/server/wifi/ActiveModeWarden.java @@ -34,7 +34,6 @@ import android.os.Message; import android.util.ArraySet; import android.util.Log; -import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.IState; import com.android.internal.util.Preconditions; @@ -42,6 +41,7 @@ import com.android.internal.util.Protocol; import com.android.internal.util.State; import com.android.internal.util.StateMachine; import com.android.server.wifi.util.WifiPermissionsUtil; +import com.android.wifi.R; import java.io.FileDescriptor; import java.io.PrintWriter; diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java index 31bb95f9a..48c387c64 100644 --- a/service/java/com/android/server/wifi/ClientModeImpl.java +++ b/service/java/com/android/server/wifi/ClientModeImpl.java @@ -96,7 +96,6 @@ import android.util.Pair; import android.util.SparseArray; import android.util.StatsLog; -import com.android.internal.R; import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.AsyncChannel; @@ -121,6 +120,7 @@ import com.android.server.wifi.util.TelephonyUtil.SimAuthRequestData; import com.android.server.wifi.util.TelephonyUtil.SimAuthResponseData; import com.android.server.wifi.util.WifiPermissionsUtil; import com.android.server.wifi.util.WifiPermissionsWrapper; +import com.android.wifi.R; import java.io.BufferedReader; import java.io.FileDescriptor; diff --git a/service/java/com/android/server/wifi/ConnectToNetworkNotificationBuilder.java b/service/java/com/android/server/wifi/ConnectToNetworkNotificationBuilder.java index 35dcd2931..53520d26c 100644 --- a/service/java/com/android/server/wifi/ConnectToNetworkNotificationBuilder.java +++ b/service/java/com/android/server/wifi/ConnectToNetworkNotificationBuilder.java @@ -24,8 +24,8 @@ import android.content.res.Resources; import android.net.wifi.ScanResult; import android.util.Log; -import com.android.internal.R; import com.android.internal.notification.SystemNotificationChannels; +import com.android.wifi.R; /** * Helper to create notifications for {@link OpenNetworkNotifier}. @@ -161,14 +161,14 @@ public class ConnectToNetworkNotificationBuilder { CharSequence title, CharSequence content, String extraData) { return mFrameworkFacade.makeNotificationBuilder(mContext, SystemNotificationChannels.NETWORK_AVAILABLE) - .setSmallIcon(R.drawable.stat_notify_wifi_in_range) + .setSmallIcon(android.R.drawable.stat_notify_wifi_in_range) .setTicker(title) .setContentTitle(title) .setContentText(content) .setDeleteIntent(getPrivateBroadcast(ACTION_USER_DISMISSED_NOTIFICATION, extraData)) .setShowWhen(false) .setLocalOnly(true) - .setColor(mResources.getColor(R.color.system_notification_accent_color, + .setColor(mResources.getColor(android.R.color.system_notification_accent_color, mContext.getTheme())); } diff --git a/service/java/com/android/server/wifi/DeviceConfigFacade.java b/service/java/com/android/server/wifi/DeviceConfigFacade.java index 2eeda1e5f..c5ca3c913 100644 --- a/service/java/com/android/server/wifi/DeviceConfigFacade.java +++ b/service/java/com/android/server/wifi/DeviceConfigFacade.java @@ -20,8 +20,8 @@ import android.content.Context; import android.os.Handler; import android.provider.DeviceConfig; -import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; +import com.android.wifi.R; import java.util.concurrent.TimeUnit; diff --git a/service/java/com/android/server/wifi/HostapdHal.java b/service/java/com/android/server/wifi/HostapdHal.java index 35f802158..9c69e26bf 100644 --- a/service/java/com/android/server/wifi/HostapdHal.java +++ b/service/java/com/android/server/wifi/HostapdHal.java @@ -29,11 +29,11 @@ import android.os.HwRemoteBinder; import android.os.RemoteException; import android.util.Log; -import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.server.wifi.WifiNative.HostapdDeathEventHandler; import com.android.server.wifi.util.ApConfigUtil; import com.android.server.wifi.util.NativeUtil; +import com.android.wifi.R; import java.util.ArrayList; import java.util.HashMap; diff --git a/service/java/com/android/server/wifi/LinkProbeManager.java b/service/java/com/android/server/wifi/LinkProbeManager.java index b33b9d389..800dc136f 100644 --- a/service/java/com/android/server/wifi/LinkProbeManager.java +++ b/service/java/com/android/server/wifi/LinkProbeManager.java @@ -24,9 +24,9 @@ import android.os.Handler; import android.provider.Settings; import android.util.Log; -import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.server.wifi.util.TimedQuotaManager; +import com.android.wifi.R; import java.io.FileDescriptor; import java.io.PrintWriter; diff --git a/service/java/com/android/server/wifi/SarManager.java b/service/java/com/android/server/wifi/SarManager.java index ebc414f7f..be25123d6 100644 --- a/service/java/com/android/server/wifi/SarManager.java +++ b/service/java/com/android/server/wifi/SarManager.java @@ -39,8 +39,8 @@ import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.Log; -import com.android.internal.R; import com.android.server.wifi.util.WifiHandler; +import com.android.wifi.R; import java.io.FileDescriptor; import java.io.PrintWriter; diff --git a/service/java/com/android/server/wifi/SavedNetworkEvaluator.java b/service/java/com/android/server/wifi/SavedNetworkEvaluator.java index d12b76a6f..f4635ab68 100644 --- a/service/java/com/android/server/wifi/SavedNetworkEvaluator.java +++ b/service/java/com/android/server/wifi/SavedNetworkEvaluator.java @@ -23,9 +23,9 @@ import android.net.wifi.WifiConfiguration; import android.telephony.SubscriptionManager; import android.util.LocalLog; -import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.server.wifi.util.TelephonyUtil; +import com.android.wifi.R; import java.util.List; diff --git a/service/java/com/android/server/wifi/ScoringParams.java b/service/java/com/android/server/wifi/ScoringParams.java index fa2392ce0..beef1ab49 100644 --- a/service/java/com/android/server/wifi/ScoringParams.java +++ b/service/java/com/android/server/wifi/ScoringParams.java @@ -25,7 +25,7 @@ import android.provider.Settings; import android.util.KeyValueListParser; import android.util.Log; -import com.android.internal.R; +import com.android.wifi.R; /** * Holds parameters used for scoring networks. diff --git a/service/java/com/android/server/wifi/SoftApManager.java b/service/java/com/android/server/wifi/SoftApManager.java index 757c1de31..08f83f323 100644 --- a/service/java/com/android/server/wifi/SoftApManager.java +++ b/service/java/com/android/server/wifi/SoftApManager.java @@ -39,7 +39,6 @@ import android.provider.Settings; import android.text.TextUtils; import android.util.Log; -import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.IState; import com.android.internal.util.Preconditions; @@ -51,6 +50,7 @@ import com.android.server.wifi.WifiNative.SoftApListener; import com.android.server.wifi.util.ApConfigUtil; import com.android.server.wifi.wificond.IApInterfaceEventCallback; import com.android.server.wifi.wificond.NativeWifiClient; +import com.android.wifi.R; import java.io.FileDescriptor; import java.io.PrintWriter; diff --git a/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java b/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java index bd68f77a3..ddbfe9aa7 100644 --- a/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java +++ b/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java @@ -28,11 +28,11 @@ import android.text.TextUtils; import android.util.Log; import android.util.MutableBoolean; -import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.ArrayUtils; import com.android.server.wifi.util.GeneralUtil.Mutable; import com.android.server.wifi.util.NativeUtil; +import com.android.wifi.R; import org.json.JSONException; import org.json.JSONObject; diff --git a/service/java/com/android/server/wifi/WakeupNotificationFactory.java b/service/java/com/android/server/wifi/WakeupNotificationFactory.java index 748a74d6c..1248d9d53 100644 --- a/service/java/com/android/server/wifi/WakeupNotificationFactory.java +++ b/service/java/com/android/server/wifi/WakeupNotificationFactory.java @@ -21,9 +21,9 @@ import android.app.PendingIntent; import android.content.Context; import android.content.Intent; -import com.android.internal.R; import com.android.internal.messages.nano.SystemMessageProto.SystemMessage; import com.android.internal.notification.SystemNotificationChannels; +import com.android.wifi.R; /** Factory for Wifi Wake notifications. */ @@ -60,7 +60,7 @@ public class WakeupNotificationFactory { CharSequence content = mContext.getText(R.string.wifi_wakeup_onboarding_subtext); CharSequence disableText = mContext.getText(R.string.wifi_wakeup_onboarding_action_disable); int color = mContext.getResources() - .getColor(R.color.system_notification_accent_color, mContext.getTheme()); + .getColor(android.R.color.system_notification_accent_color, mContext.getTheme()); final Notification.Action disableAction = new Notification.Action.Builder( null /* icon */, disableText, getPrivateBroadcast(ACTION_TURN_OFF_WIFI_WAKE)) diff --git a/service/java/com/android/server/wifi/WifiApConfigStore.java b/service/java/com/android/server/wifi/WifiApConfigStore.java index 5b230bbc8..4f152b057 100644 --- a/service/java/com/android/server/wifi/WifiApConfigStore.java +++ b/service/java/com/android/server/wifi/WifiApConfigStore.java @@ -33,10 +33,10 @@ import android.os.Handler; import android.text.TextUtils; import android.util.Log; -import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.messages.nano.SystemMessageProto.SystemMessage; import com.android.internal.notification.SystemNotificationChannels; +import com.android.wifi.R; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; @@ -217,7 +217,7 @@ public class WifiApConfigStore { mContext.getResources().getText(R.string.wifi_softap_config_change_detailed); int color = mContext.getResources().getColor( - R.color.system_notification_accent_color, mContext.getTheme()); + android.R.color.system_notification_accent_color, mContext.getTheme()); return new Notification.Builder(mContext, SystemNotificationChannels.NETWORK_STATUS) .setSmallIcon(R.drawable.ic_wifi_settings) diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java index b0d679256..3b2ccea93 100644 --- a/service/java/com/android/server/wifi/WifiConfigManager.java +++ b/service/java/com/android/server/wifi/WifiConfigManager.java @@ -48,12 +48,12 @@ import android.util.LocalLog; import android.util.Log; import android.util.Pair; -import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.server.wifi.hotspot2.PasspointManager; import com.android.server.wifi.util.TelephonyUtil; import com.android.server.wifi.util.WifiPermissionsUtil; import com.android.server.wifi.util.WifiPermissionsWrapper; +import com.android.wifi.R; import org.xmlpull.v1.XmlPullParserException; diff --git a/service/java/com/android/server/wifi/WifiConnectivityManager.java b/service/java/com/android/server/wifi/WifiConnectivityManager.java index 2ea7addd3..974dd343c 100644 --- a/service/java/com/android/server/wifi/WifiConnectivityManager.java +++ b/service/java/com/android/server/wifi/WifiConnectivityManager.java @@ -36,9 +36,9 @@ import android.os.WorkSource; import android.util.LocalLog; import android.util.Log; -import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.server.wifi.util.ScanResultUtil; +import com.android.wifi.R; import java.io.FileDescriptor; import java.io.PrintWriter; diff --git a/service/java/com/android/server/wifi/WifiDiagnostics.java b/service/java/com/android/server/wifi/WifiDiagnostics.java index da1e5b3c5..adb1992d1 100644 --- a/service/java/com/android/server/wifi/WifiDiagnostics.java +++ b/service/java/com/android/server/wifi/WifiDiagnostics.java @@ -23,10 +23,10 @@ import android.util.Base64; import android.util.Log; import android.util.SparseLongArray; -import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.server.wifi.util.ByteArrayRingBuffer; import com.android.server.wifi.util.StringUtil; +import com.android.wifi.R; import java.io.BufferedReader; import java.io.ByteArrayOutputStream; diff --git a/service/java/com/android/server/wifi/WifiInjector.java b/service/java/com/android/server/wifi/WifiInjector.java index 1e2dac8d7..45ceae2dd 100644 --- a/service/java/com/android/server/wifi/WifiInjector.java +++ b/service/java/com/android/server/wifi/WifiInjector.java @@ -45,7 +45,6 @@ import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import android.util.LocalLog; -import com.android.internal.R; import com.android.internal.os.PowerProfile; import com.android.server.am.ActivityManagerService; import com.android.server.wifi.aware.WifiAwareMetrics; @@ -60,6 +59,7 @@ import com.android.server.wifi.rtt.RttMetrics; import com.android.server.wifi.util.WifiPermissionsUtil; import com.android.server.wifi.util.WifiPermissionsWrapper; import com.android.server.wifi.wificond.IWificond; +import com.android.wifi.R; import java.util.Random; diff --git a/service/java/com/android/server/wifi/WifiNetworkSelector.java b/service/java/com/android/server/wifi/WifiNetworkSelector.java index b392a3724..5d4a12eda 100644 --- a/service/java/com/android/server/wifi/WifiNetworkSelector.java +++ b/service/java/com/android/server/wifi/WifiNetworkSelector.java @@ -34,11 +34,11 @@ import android.util.LocalLog; import android.util.Log; import android.util.Pair; -import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.Preconditions; import com.android.server.wifi.proto.nano.WifiMetricsProto; import com.android.server.wifi.util.ScanResultUtil; +import com.android.wifi.R; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java index a16d9684d..46af85000 100644 --- a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java +++ b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java @@ -45,11 +45,11 @@ import android.text.TextUtils; import android.util.Log; import android.util.Pair; -import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.messages.nano.SystemMessageProto.SystemMessage; import com.android.internal.notification.SystemNotificationChannels; import com.android.server.wifi.util.WifiPermissionsUtil; +import com.android.wifi.R; import java.io.FileDescriptor; import java.io.PrintWriter; @@ -882,7 +882,7 @@ public class WifiNetworkSuggestionsManager { CharSequence appName = getAppName(packageName, uid); Notification notification = new Notification.Builder( mContext, SystemNotificationChannels.NETWORK_STATUS) - .setSmallIcon(R.drawable.stat_notify_wifi_in_range) + .setSmallIcon(android.R.drawable.stat_notify_wifi_in_range) .setTicker(mResources.getString(R.string.wifi_suggestion_title)) .setContentTitle(mResources.getString(R.string.wifi_suggestion_title)) .setStyle(new Notification.BigTextStyle() @@ -891,7 +891,7 @@ public class WifiNetworkSuggestionsManager { packageName, uid)) .setShowWhen(false) .setLocalOnly(true) - .setColor(mResources.getColor(R.color.system_notification_accent_color, + .setColor(mResources.getColor(android.R.color.system_notification_accent_color, mContext.getTheme())) .addAction(userAllowAppNotificationAction) .addAction(userDisallowAppNotificationAction) diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java index 8c398f5c3..329b912e8 100644 --- a/service/java/com/android/server/wifi/WifiServiceImpl.java +++ b/service/java/com/android/server/wifi/WifiServiceImpl.java @@ -109,6 +109,7 @@ import com.android.server.wifi.hotspot2.PasspointProvider; import com.android.server.wifi.util.ExternalCallbackTracker; import com.android.server.wifi.util.WifiHandler; import com.android.server.wifi.util.WifiPermissionsUtil; +import com.android.wifi.R; import java.io.BufferedReader; import java.io.FileDescriptor; @@ -1139,7 +1140,7 @@ public class WifiServiceImpl extends BaseWifiService { private void startForFirstRequestLocked(LocalOnlyHotspotRequestInfo request) { boolean is5Ghz = hasAutomotiveFeature(mContext) && mContext.getResources().getBoolean( - com.android.internal.R.bool.config_wifi_local_only_hotspot_5ghz) + R.bool.config_wifi_local_only_hotspot_5ghz) && is5GhzSupported(); int band = is5Ghz ? WifiConfiguration.AP_BAND_5GHZ @@ -2318,13 +2319,13 @@ public class WifiServiceImpl extends BaseWifiService { } return mContext.getResources().getBoolean( - com.android.internal.R.bool.config_wifi_dual_band_support); + R.bool.config_wifi_dual_band_support); } private int getMaxApInterfacesCount() { //TODO (b/123227116): pull it from the HAL return mContext.getResources().getInteger( - com.android.internal.R.integer.config_wifi_max_ap_interfaces); + R.integer.config_wifi_max_ap_interfaces); } private boolean isConcurrentLohsAndTetheringSupported() { @@ -2346,7 +2347,7 @@ public class WifiServiceImpl extends BaseWifiService { mLog.info("needs5GHzToAnyApBandConversion uid=%").c(Binder.getCallingUid()).flush(); } return mContext.getResources().getBoolean( - com.android.internal.R.bool.config_wifi_convert_apband_5ghz_to_any); + R.bool.config_wifi_convert_apband_5ghz_to_any); } /** @@ -2550,7 +2551,7 @@ public class WifiServiceImpl extends BaseWifiService { intentFilter.addAction(PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED); boolean trackEmergencyCallState = mContext.getResources().getBoolean( - com.android.internal.R.bool.config_wifi_turn_off_during_emergency_call); + R.bool.config_wifi_turn_off_during_emergency_call); if (trackEmergencyCallState) { intentFilter.addAction(TelephonyIntents.ACTION_EMERGENCY_CALL_STATE_CHANGED); } diff --git a/service/java/com/android/server/wifi/WifiStackService.java b/service/java/com/android/server/wifi/WifiStackService.java index 214f85bca..90b509674 100644 --- a/service/java/com/android/server/wifi/WifiStackService.java +++ b/service/java/com/android/server/wifi/WifiStackService.java @@ -40,7 +40,6 @@ import android.os.UserHandle; import android.os.storage.StorageManager; import android.util.Log; -import com.android.internal.R; import com.android.internal.annotations.GuardedBy; import com.android.server.wifi.aware.WifiAwareService; import com.android.server.wifi.p2p.WifiP2pService; @@ -141,20 +140,20 @@ public class WifiStackService extends Service { List<NotificationChannel> channelsList = new ArrayList<>(); final NotificationChannel networkStatusChannel = new NotificationChannel( NETWORK_STATUS, - getString(R.string.notification_channel_network_status), + getString(android.R.string.notification_channel_network_status), NotificationManager.IMPORTANCE_LOW); channelsList.add(networkStatusChannel); final NotificationChannel networkAlertsChannel = new NotificationChannel( NETWORK_ALERTS, - getString(R.string.notification_channel_network_alerts), + getString(android.R.string.notification_channel_network_alerts), NotificationManager.IMPORTANCE_HIGH); networkAlertsChannel.setBlockableSystem(true); channelsList.add(networkAlertsChannel); final NotificationChannel networkAvailable = new NotificationChannel( NETWORK_AVAILABLE, - getString(R.string.notification_channel_network_available), + getString(android.R.string.notification_channel_network_available), NotificationManager.IMPORTANCE_LOW); networkAvailable.setBlockableSystem(true); channelsList.add(networkAvailable); diff --git a/service/java/com/android/server/wifi/WrongPasswordNotifier.java b/service/java/com/android/server/wifi/WrongPasswordNotifier.java index 37e23da64..b25549a50 100644 --- a/service/java/com/android/server/wifi/WrongPasswordNotifier.java +++ b/service/java/com/android/server/wifi/WrongPasswordNotifier.java @@ -86,14 +86,14 @@ public class WrongPasswordNotifier { .setAutoCancel(true) .setTimeoutAfter(CANCEL_TIMEOUT_MILLISECONDS) // TODO(zqiu): consider creating a new icon. - .setSmallIcon(com.android.internal.R.drawable.stat_notify_wifi_in_range) + .setSmallIcon(android.R.drawable.stat_notify_wifi_in_range) .setContentTitle(mContext.getString( - com.android.internal.R.string.wifi_available_title_failed_to_connect)) + com.android.wifi.R.string.wifi_available_title_failed_to_connect)) .setContentText(ssid) .setContentIntent(mFrameworkFacade.getActivity( mContext, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT)) .setColor(mContext.getResources().getColor( - com.android.internal.R.color.system_notification_accent_color)); + android.R.color.system_notification_accent_color)); mNotificationManager.notify(NOTIFICATION_ID, builder.build()); } diff --git a/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java b/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java index 6ab0129f8..2a808bee2 100644 --- a/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java +++ b/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java @@ -81,7 +81,6 @@ import android.view.WindowManager; import android.widget.EditText; import android.widget.TextView; -import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.AsyncChannel; import com.android.internal.util.Protocol; @@ -95,6 +94,7 @@ import com.android.server.wifi.util.WifiAsyncChannel; import com.android.server.wifi.util.WifiHandler; import com.android.server.wifi.util.WifiPermissionsUtil; import com.android.server.wifi.util.WifiPermissionsWrapper; +import com.android.wifi.R; import java.io.FileDescriptor; import java.io.PrintWriter; @@ -452,7 +452,7 @@ public class WifiP2pServiceImpl extends IWifiP2pManager.Stub { PackageManager.FEATURE_WIFI_DIRECT); mThisDevice.primaryDeviceType = mContext.getResources().getString( - com.android.internal.R.string.config_wifi_p2p_device_type); + R.string.config_wifi_p2p_device_type); HandlerThread wifiP2pThread = mWifiInjector.getWifiP2pServiceHandlerThread(); mClientHandler = new ClientHandler(TAG, wifiP2pThread.getLooper()); diff --git a/service/java/com/android/server/wifi/scanner/WificondScannerImpl.java b/service/java/com/android/server/wifi/scanner/WificondScannerImpl.java index c8319c6ec..9bf8ea489 100644 --- a/service/java/com/android/server/wifi/scanner/WificondScannerImpl.java +++ b/service/java/com/android/server/wifi/scanner/WificondScannerImpl.java @@ -25,7 +25,6 @@ import android.os.Looper; import android.os.Message; import android.util.Log; -import com.android.internal.R; import com.android.server.wifi.Clock; import com.android.server.wifi.ScanDetail; import com.android.server.wifi.WifiMonitor; @@ -33,6 +32,7 @@ import com.android.server.wifi.WifiNative; import com.android.server.wifi.scanner.ChannelHelper.ChannelCollection; import com.android.server.wifi.util.NativeUtil; import com.android.server.wifi.util.ScanResultUtil; +import com.android.wifi.R; import java.io.FileDescriptor; import java.io.PrintWriter; diff --git a/service/res/drawable/ic_wifi_settings.xml b/service/res/drawable/ic_wifi_settings.xml new file mode 100644 index 000000000..c678ad4dd --- /dev/null +++ b/service/res/drawable/ic_wifi_settings.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2017 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <path + android:pathData="M 0 0 H 24 V 24 H 0 V 0 Z" /> + <path + android:fillColor="#000000" + android:pathData="M12.584,15.93c0.026-0.194,0.044-0.397,0.044-0.608c0-0.211-0.018-0.405-0.044-0.608l1.304-1.022 +c0.115-0.088,0.15-0.256,0.071-0.397l-1.234-2.133c-0.071-0.132-0.238-0.185-0.379-0.132l-1.533,0.617 +c-0.317-0.247-0.67-0.449-1.04-0.608L9.535,9.4c-0.018-0.132-0.141-0.247-0.3-0.247H6.768c-0.15,0-0.282,0.115-0.3,0.256 +L6.23,11.048c-0.379,0.159-0.723,0.361-1.04,0.608l-1.533-0.617c-0.141-0.053-0.3,0-0.379,0.132l-1.234,2.133 +c-0.079,0.132-0.044,0.3,0.07,0.397l1.304,1.022c-0.026,0.194-0.044,0.405-0.044,0.608s0.018,0.405,0.044,0.608l-1.304,1.022 +c-0.115,0.088-0.15,0.256-0.07,0.397l1.234,2.133c0.07,0.132,0.238,0.185,0.379,0.132l1.533-0.617 +c0.317,0.247,0.67,0.449,1.04,0.608l0.238,1.639c0.018,0.15,0.15,0.256,0.3,0.256h2.467c0.159,0,0.282-0.115,0.3-0.256 +l0.238-1.639c0.379-0.15,0.723-0.361,1.04-0.608l1.533,0.617c0.141,0.053,0.3,0,0.379-0.132l1.234-2.133 +c0.071-0.132,0.044-0.3-0.07-0.397L12.584,15.93z +M8.002,17.481c-1.19,0-2.159-0.969-2.159-2.159s0.969-2.159,2.159-2.159 +s2.159,0.969,2.159,2.159C10.161,16.512,9.191,17.481,8.002,17.481z" /> + <path + android:fillColor="#000000" + android:pathData="M16.003,12.026l5.995-7.474c-0.229-0.172-2.537-2.06-6-2.06s-5.771,1.889-6,2.06l5.995,7.469l0.005,0.01L16.003,12.026z" /> +</vector>
\ No newline at end of file diff --git a/service/res/layout/wifi_p2p_dialog.xml b/service/res/layout/wifi_p2p_dialog.xml new file mode 100644 index 000000000..86dcbfab3 --- /dev/null +++ b/service/res/layout/wifi_p2p_dialog.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2011 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. +--> + +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <LinearLayout android:id="@+id/info" + style="@style/wifi_section" /> + + <LinearLayout android:id="@+id/enter_pin_section" + style="@style/wifi_section" + android:visibility="gone"> + + <LinearLayout + style="@style/wifi_item"> + <TextView + android:text="@string/wifi_p2p_enter_pin_message" + style="@style/wifi_item_label" /> + + <EditText android:id="@+id/wifi_p2p_wps_pin" + android:singleLine="true" + android:maxLines="8" + android:inputType="number" + style="@style/wifi_item_content" /> + </LinearLayout> + </LinearLayout> + </LinearLayout> + +</ScrollView> diff --git a/service/res/layout/wifi_p2p_dialog_row.xml b/service/res/layout/wifi_p2p_dialog_row.xml new file mode 100644 index 000000000..2c88b1082 --- /dev/null +++ b/service/res/layout/wifi_p2p_dialog_row.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 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. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + style="@style/wifi_item"> + <TextView + style="@style/wifi_item_label" + android:id="@+id/name" /> + + <TextView + android:id="@+id/value" + style="@style/wifi_item_content" + android:textStyle="bold" + android:textAlignment="viewStart" /> +</LinearLayout> diff --git a/service/res/values/config.xml b/service/res/values/config.xml new file mode 100644 index 000000000..928c847e2 --- /dev/null +++ b/service/res/values/config.xml @@ -0,0 +1,236 @@ +<?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. +--> + +<!-- These resources are around just to allow their values to be customized + for different hardware and product builds. Do not translate. + + NOTE: The naming convention is "config_camelCaseValue". Some legacy + entries do not follow the convention, but all new entries should. --> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Boolean indicating whether the wifi chipset has dual frequency band support --> + <bool translatable="false" name="config_wifi_dual_band_support">false</bool> + + <!-- Maximum number of concurrent WiFi interfaces in AP mode --> + <integer translatable="false" name="config_wifi_max_ap_interfaces">1</integer> + + <!-- Boolean indicating whether the wifi chipset requires the softap band be --> + <!-- converted from 5GHz to ANY due to hardware restrictions --> + <bool translatable="false" name="config_wifi_convert_apband_5ghz_to_any">false</bool> + + <!-- Boolean indicating whether 802.11r Fast BSS Transition is enabled on this platform --> + <bool translatable="false" name="config_wifi_fast_bss_transition_enabled">false</bool> + + <!-- Device type information conforming to Annex B format in WiFi Direct specification. + The default represents a dual-mode smartphone --> + <string translatable="false" name="config_wifi_p2p_device_type">10-0050F204-5</string> + + <!-- Boolean indicating whether the wifi chipset supports background scanning mechanism. + This mechanism allows the host to remain in suspend state and the dongle to actively + scan and wake the host when a configured SSID is detected by the dongle. This chipset + capability can provide power savings when wifi needs to be always kept on. --> + <bool translatable="false" name="config_wifi_background_scan_support">false</bool> + + <!-- Boolean indicating we re-try re-associating once upon disconnection and RSSI is high failure --> + <bool translatable="true" name="config_wifi_enable_disconnection_debounce">true</bool> + + <!-- Boolean indicating whether or not to revert to default country code when cellular + radio is unable to find any MCC information to infer wifi country code from --> + <bool translatable="false" name="config_wifi_revert_country_code_on_cellular_loss">false</bool> + + <!-- Integer size limit, in KB, for a single WifiLogger ringbuffer, in default logging mode --> + <integer translatable="false" name="config_wifi_logger_ring_buffer_default_size_limit_kb">32</integer> + + <!-- Integer size limit, in KB, for a single WifiLogger ringbuffer, in verbose logging mode --> + <integer translatable="false" name="config_wifi_logger_ring_buffer_verbose_size_limit_kb">1024</integer> + + <!-- Array indicating wifi fatal firmware alert error code list from driver --> + <integer-array translatable="false" name="config_wifi_fatal_firmware_alert_error_code_list"> + <!-- Example: + <item>0</item> + <item>1</item> + <item>2</item> + --> + </integer-array> + + <!-- Boolean indicating whether or not wifi should turn off when emergency call is made --> + <bool translatable="false" name="config_wifi_turn_off_during_emergency_call">false</bool> + + <!-- Integer specifying the basic autojoin parameters --> + <integer translatable="false" name="config_wifi_framework_5GHz_preference_boost_threshold">-65</integer> + <integer translatable="false" name="config_wifi_framework_5GHz_preference_boost_factor">40</integer> + <integer translatable="false" name="config_wifi_framework_5GHz_preference_penalty_threshold">-75</integer> + <integer translatable="false" name="config_wifi_framework_RSSI_SCORE_OFFSET">85</integer> + <integer translatable="false" name="config_wifi_framework_RSSI_SCORE_SLOPE">4</integer> + <integer translatable="false" name="config_wifi_framework_SAME_BSSID_AWARD">24</integer> + <integer translatable="false" name="config_wifi_framework_LAST_SELECTION_AWARD">480</integer> + <integer translatable="false" name="config_wifi_framework_PASSPOINT_SECURITY_AWARD">40</integer> + <integer translatable="false" name="config_wifi_framework_SECURITY_AWARD">80</integer> + <!-- Integer specifying the base interval in seconds for the exponential backoff scan for autojoin --> + <integer translatable="false" name="config_wifi_framework_exponential_backoff_scan_base_interval">20</integer> + <!-- Integers specifying the max packet Tx/Rx rates for full scan --> + <integer translatable="false" name="config_wifi_framework_max_tx_rate_for_full_scan">8</integer> + <integer translatable="false" name="config_wifi_framework_max_rx_rate_for_full_scan">16</integer> + <!-- Integers specifying the min packet Tx/Rx rates in packets per second for staying on the same network --> + <integer translatable="false" name="config_wifi_framework_min_tx_rate_for_staying_on_network">16</integer> + <integer translatable="false" name="config_wifi_framework_min_rx_rate_for_staying_on_network">16</integer> + <!-- Integer parameters of the wifi to cellular handover feature + wifi should not stick to bad networks --> + <!-- Integer threshold for low network score, should be somewhat less than the entry threshhold --> + <integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_5GHz">-80</integer> + <!-- Integer threshold, do not connect to APs with RSSI lower than the entry threshold --> + <integer translatable="false" name="config_wifi_framework_wifi_score_entry_rssi_threshold_5GHz">-77</integer> + <integer translatable="false" name="config_wifi_framework_wifi_score_low_rssi_threshold_5GHz">-70</integer> + <integer translatable="false" name="config_wifi_framework_wifi_score_good_rssi_threshold_5GHz">-57</integer> + <integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_24GHz">-83</integer> + <integer translatable="false" name="config_wifi_framework_wifi_score_entry_rssi_threshold_24GHz">-80</integer> + <integer translatable="false" name="config_wifi_framework_wifi_score_low_rssi_threshold_24GHz">-73</integer> + <integer translatable="false" name="config_wifi_framework_wifi_score_good_rssi_threshold_24GHz">-60</integer> + + <!-- Integer delay in milliseconds before shutting down soft AP when there + are no connected devices. Framework will enforce a minimum limit on + this value and this setting will be overridden if the provided value is + smaller than the limit. --> + <integer translatable="false" name="config_wifi_framework_soft_ap_timeout_delay">600000</integer> + + <string translatable="false" name="config_wifi_random_mac_oui">DA-A1-19</string> + <string translatable="false" name="config_wifi_framework_sap_2G_channel_list">1,6,11</string> + + <bool translatable="false" name="config_wifi_framework_cellular_handover_enable_user_triggered_adjustment">true</bool> + + <!-- Integer packet threshold used to allow scan while associated --> + <integer translatable="false" name="config_wifi_framework_associated_full_scan_tx_packet_threshold">5</integer> + <integer translatable="false" name="config_wifi_framework_associated_full_scan_rx_packet_threshold">10</integer> + <integer translatable="false" name="config_wifi_framework_associated_partial_scan_tx_packet_threshold">40</integer> + <integer translatable="false" name="config_wifi_framework_associated_partial_scan_rx_packet_threshold">80</integer> + <integer translatable="false" name="config_wifi_framework_network_switch_tx_packet_threshold">2</integer> + <integer translatable="false" name="config_wifi_framework_network_switch_rx_packet_threshold">20</integer> + + <!-- Integer indicating wpa_supplicant scan interval in milliseconds --> + <integer translatable="false" name="config_wifi_supplicant_scan_interval">15000</integer> + + <!-- Integer indicating amount of time failed networks areblacklisted for the purpose + of network switching in milliseconds --> + <integer translatable="false" name="config_wifi_network_switching_blacklist_time">172800000</integer> + + <!-- Integer indicating wpa_supplicant scan interval when p2p is connected in milliseconds --> + <integer translatable="false" name="config_wifi_scan_interval_p2p_connected">60000</integer> + + <!-- Integer indicating disconnect mode short scan interval in milliseconds --> + <integer translatable="false" name="config_wifi_disconnected_short_scan_interval">15000</integer> + + <!-- Integer indicating associated partial scan short interval in milliseconds --> + <integer translatable="false" name="config_wifi_associated_short_scan_interval">20000</integer> + + <!-- Integer indicating associated full scan backoff, representing a fraction: xx/8 --> + <integer translatable="false" name="config_wifi_framework_associated_full_scan_backoff">12</integer> + + <!-- Integer indicating associated full scan max interval in milliseconds --> + <integer translatable="false" name="config_wifi_framework_associated_full_scan_max_interval">300000</integer> + + <!-- Integer indicating associated full scan max total dwell time in milliseconds --> + <integer translatable="false" name="config_wifi_framework_associated_full_scan_max_total_dwell_time">500</integer> + + <!-- Integer indicating associated full scan max num active channels --> + <integer translatable="false" name="config_wifi_framework_associated_partial_scan_max_num_active_channels">6</integer> + + <!-- Integer indicating RSSI boost given to current network --> + <integer translatable="false" name="config_wifi_framework_current_network_boost">16</integer> + + <!-- Integer delay in milliseconds before set wlan interface up during watchdog recovery --> + <integer translatable="false" name="config_wifi_framework_recovery_timeout_delay">2000</integer> + + <!-- Integer indicating how to handle beacons with uninitialized RSSI value of 0 --> + <integer translatable="false" name="config_wifi_framework_scan_result_rssi_level_patchup_value">-85</integer> + + <!-- Boolean indicating associated network selection is allowed --> + <bool translatable="false" name="config_wifi_framework_enable_associated_network_selection">true</bool> + + <!-- Boolean indicating whether single radio chain scan results are to be used for network selection --> + <bool translatable="false" name="config_wifi_framework_use_single_radio_chain_scan_results_network_selection">true</bool> + + <!-- Boolean indicating that wifi only link configuratios that have exact same credentials (i.e PSK) --> + <bool translatable="false" name="config_wifi_only_link_same_credential_configurations">true</bool> + + <!-- Boolean indicating whether framework needs to set the tx power limit for meeting SAR requirements --> + <bool translatable="false" name="config_wifi_framework_enable_sar_tx_power_limit">false</bool> + + <!-- Boolean indicating whether framework should use detection of softAP mode to set the tx + power limit for meeting SAR requirements --> + <bool translatable="false" name="config_wifi_framework_enable_soft_ap_sar_tx_power_limit">false</bool> + + <!-- Boolean indicating whether framework needs to use body proximity to set the tx power limit + for meeting SAR requirements --> + <bool translatable="false" name="config_wifi_framework_enable_body_proximity_sar_tx_power_limit">false</bool> + + <!-- String for the sensor type for body/head proximity for SAR --> + <string translatable="false" name="config_wifi_sar_sensor_type"></string> + + <!-- Integer indicating event id by sar sensor for free space --> + <integer translatable="false" name="config_wifi_framework_sar_free_space_event_id">1</integer> + + <!-- Integer indicating event id by sar sensor for near hand --> + <integer translatable="false" name="config_wifi_framework_sar_near_hand_event_id">2</integer> + + <!-- Integer indicating event id by sar sensor for near head --> + <integer translatable="false" name="config_wifi_framework_sar_near_head_event_id">3</integer> + + <!-- Integer indicating event id by sar sensor for near body --> + <integer translatable="false" name="config_wifi_framework_sar_near_body_event_id">4</integer> + + <!-- Wifi driver supports batched scan --> + <bool translatable="false" name="config_wifi_batched_scan_supported">false</bool> + + <!-- Wifi driver supports Automatic channel selection (ACS) for softap --> + <bool translatable="false" name="config_wifi_softap_acs_supported">false</bool> + + <!-- Channel list restriction to Automatic channel selection (ACS) for softap. If the device + doesn't want to restrict channels this should be empty. Value is a comma separated channel + string and/or channel range string like '1-6,11' --> + <string translatable="false" name="config_wifi_softap_acs_supported_channel_list"></string> + + <!-- Wifi driver supports IEEE80211AC for softap --> + <bool translatable="false" name="config_wifi_softap_ieee80211ac_supported">false</bool> + + <!-- Indicates that local-only hotspot should be brought up at 5GHz. This option is + for automotive builds only (the one that have PackageManager#FEATURE_AUTOMOTIVE) --> + <bool translatable="false" name="config_wifi_local_only_hotspot_5ghz">false</bool> + + <!-- Indicates that connected MAC randomization is supported on this device --> + <bool translatable="false" name="config_wifi_connected_mac_randomization_supported">false</bool> + + <!-- Indicates that p2p MAC randomization is supported on this device --> + <bool translatable="false" name="config_wifi_p2p_mac_randomization_supported">false</bool> + + <!-- Indicates that AP mode MAC randomization is supported on this device --> + <bool translatable="false" name="config_wifi_ap_mac_randomization_supported">true</bool> + + <!-- flag for activating paranoid MAC randomization on a limited set of SSIDs --> + <bool translatable="false" name="config_wifi_aggressive_randomization_ssid_whitelist_enabled">false</bool> + + <!-- Indicates that wifi link probing is supported on this device --> + <bool translatable="false" name="config_wifi_link_probing_supported">false</bool> + + <!-- Configure wifi tcp buffersizes in the form: + rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max --> + <string name="config_wifi_tcp_buffers" translatable="false">524288,1048576,2097152,262144,524288,1048576</string> + + <!-- Do not translate. Default access point SSID used for tethering --> + <string name="wifi_tether_configure_ssid_default" translatable="false">AndroidAP</string> + <!-- Do not translate. Default access point SSID used for local only hotspot --> + <string name="wifi_localhotspot_configure_ssid_default" translatable="false">AndroidShare</string> + +</resources> diff --git a/service/res/values/strings.xml b/service/res/values/strings.xml index 83d6e5412..a899e72be 100644 --- a/service/res/values/strings.xml +++ b/service/res/values/strings.xml @@ -17,4 +17,102 @@ <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- Official label of the wifi stack --> <string name="wifiAppLabel" product="default">System Wi-Fi</string> + <!-- A notification is shown when there are open wireless networks nearby. This is the notification's title. --> + <plurals name="wifi_available"> + <item quantity="one">Wi-Fi network available</item> + <item quantity="other">Wi-Fi networks available</item> + </plurals> + <!-- A notification is shown when there are open wireless networks nearby. This is the notification's message. --> + <plurals name="wifi_available_detailed"> + <item quantity="one">Open Wi-Fi network available</item> + <item quantity="other">Open Wi-Fi networks available</item> + </plurals> + + <!-- Notification title for a nearby open wireless network.--> + <string name="wifi_available_title">Connect to open Wi\u2011Fi network</string> + <!-- Notification title when the system is connecting to the specified network. The network name is specified in the notification content. --> + <string name="wifi_available_title_connecting">Connecting to Wi\u2011Fi network</string> + <!-- Notification title when the system has connected to the network. The network name is specified in the notification content. --> + <string name="wifi_available_title_connected">Connected to Wi\u2011Fi network</string> + <!-- Notification title when the system failed to connect to the specified network. --> + <string name="wifi_available_title_failed_to_connect">Could not connect to Wi\u2011Fi network</string> + <!-- Notification content when the system failed to connect to the specified network. This informs the user that tapping on this notification will open the wifi picker. --> + <string name="wifi_available_content_failed_to_connect">Tap to see all networks</string> + <!-- Notification action name for connecting to the network specified in the notification body. --> + <string name="wifi_available_action_connect">Connect</string> + <!-- Notification action name for opening the wifi picker, showing the user all the nearby networks. --> + <string name="wifi_available_action_all_networks">All networks</string> + + <!-- Notification title for a connection to a app suggested wireless network.--> + <string name="wifi_suggestion_title">Allow suggested Wi\u2011Fi networks?</string> + <!-- Notification content for a connection to a app suggested wireless network.--> + <string name="wifi_suggestion_content"><xliff:g id="name" example="App123">%s</xliff:g> suggested networks. Device may connect automatically. </string> + <!-- Notification action for allowing app specified in the notification body.--> + <string name="wifi_suggestion_action_allow_app">Allow</string> + <!-- Notification action for disallowing app specified in the notification body.--> + <string name="wifi_suggestion_action_disallow_app">No thanks</string> + + <!--Notification title for Wi-Fi Wake onboarding. This is displayed the first time a user disables Wi-Fi with the feature enabled. --> + <string name="wifi_wakeup_onboarding_title">Wi\u2011Fi will turn on automatically</string> + <!--Notification subtext for Wi-Fi Wake onboarding.--> + <string name="wifi_wakeup_onboarding_subtext">When you\'re near a high quality saved network</string> + <!--Notification action to disable Wi-Fi Wake during onboarding.--> + <string name="wifi_wakeup_onboarding_action_disable">Don\'t turn back on</string> + <!--Notification title for when Wi-Fi Wake enables Wi-Fi.--> + <string name="wifi_wakeup_enabled_title">Wi\u2011Fi turned on automatically</string> + <!--Notification content for when Wi-Fi Wake enables Wi-Fi. %1$s is the SSID of the nearby saved network that triggered the wakeup. --> + <string name="wifi_wakeup_enabled_content">You\u0027re near a saved network: <xliff:g id="network_ssid">%1$s</xliff:g></string> + + <!-- A notification is shown when the user's softap config has been changed due to underlying + hardware restrictions. This is the notifications's title. + [CHAR_LIMIT=NONE] --> + <string name="wifi_softap_config_change">Changes to your hotspot settings</string> + + <!-- A notification is shown when the user's softap config has been changed due to underlying + hardware restrictions. This is the notification's summary message. + [CHAR_LIMIT=NONE] --> + <string name="wifi_softap_config_change_summary">Your hotspot band has changed.</string> + + <!-- A notification is shown when the user's softap config has been changed due to underlying + hardware restrictions. This is the notification's full message. + [CHAR_LIMIT=NONE] --> + <string name="wifi_softap_config_change_detailed">This device doesn\u2019t support your preference for 5GHz only. Instead, this device will use the 5GHz band when available.</string> + + <!-- A notification is shown when a user's selected SSID is later disabled due to connectivity problems. This is the notification's title / ticker. --> + <string name="wifi_watchdog_network_disabled">Couldn\'t connect to Wi-Fi</string> + <!-- A notification is shown when a user's selected SSID is later disabled due to connectivity problems. The complete alert msg is: <hotspot name> + this string, i.e. "Linksys has a poor internet connection" --> + <string name="wifi_watchdog_network_disabled_detailed">\u0020has a poor internet connection.</string> + + <!-- A notification is shown the first time a connection is attempted on an app owned AP --> + <!-- title for this message --> + <string name="wifi_connect_alert_title">Allow connection?</string> + <!-- message explaining who is connecting to what --> + <string name="wifi_connect_alert_message">Application %1$s would like to connect to Wifi Network %2$s</string> + <!-- default application in case name can not be found --> + <string name="wifi_connect_default_application">An application</string> + + <string name="wifi_p2p_dialog_title">Wi-Fi Direct</string> + <string name="wifi_p2p_turnon_message">Start Wi-Fi Direct. This will turn off Wi-Fi client/hotspot.</string> + <string name="wifi_p2p_failed_message">Couldn\'t start Wi-Fi Direct.</string> + <string name="wifi_p2p_enabled_notification_title">Wi-Fi Direct is on</string> + <string name="wifi_p2p_enabled_notification_message">Tap for settings</string> + + <string name="accept">Accept</string> + <string name="decline">Decline</string> + <string name="ok">OK</string> + + <string name="wifi_p2p_invitation_sent_title">Invitation sent</string> + <string name="wifi_p2p_invitation_to_connect_title">Invitation to connect</string> + + <string name="wifi_p2p_from_message">From: </string> + <string name="wifi_p2p_to_message">To: </string> + <string name="wifi_p2p_enter_pin_message">Type the required PIN: </string> + <string name="wifi_p2p_show_pin_message">PIN: </string> + + <string name="wifi_p2p_frequency_conflict_message" product="tablet">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">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">The phone will temporarily disconnect from Wi-Fi while it\'s connected to <xliff:g id="device_name">%1$s</xliff:g></string> + <!-- Dialog ok button--> + <string name="dlg_ok">OK</string> + </resources> diff --git a/service/res/values/styles.xml b/service/res/values/styles.xml new file mode 100644 index 000000000..1de17d635 --- /dev/null +++ b/service/res/values/styles.xml @@ -0,0 +1,45 @@ +<?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> + <!-- Wifi dialog styles --> + <style name="wifi_item"> + <item name="android:layout_width">200dip</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:layout_marginTop">8dip</item> + <item name="android:layout_marginStart">16dip</item> + <item name="android:layout_marginEnd">16dip</item> + <item name="android:orientation">vertical</item> + <item name="android:gravity">start</item> + </style> + + <style name="wifi_item_label"> + <item name="android:layout_width">wrap_content</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:textSize">14sp</item> + </style> + + <style name="wifi_item_content"> + <item name="android:layout_width">match_parent</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:textSize">18sp</item> + </style> + + <style name="wifi_section"> + <item name="android:layout_width">match_parent</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:orientation">vertical</item> + </style> +</resources> diff --git a/tests/wifitests/src/com/android/server/wifi/ActiveModeWardenTest.java b/tests/wifitests/src/com/android/server/wifi/ActiveModeWardenTest.java index 7d788c3d1..4ec6b8575 100644 --- a/tests/wifitests/src/com/android/server/wifi/ActiveModeWardenTest.java +++ b/tests/wifitests/src/com/android/server/wifi/ActiveModeWardenTest.java @@ -56,9 +56,9 @@ import android.util.Log; import androidx.test.filters.SmallTest; -import com.android.internal.R; import com.android.server.wifi.util.GeneralUtil; import com.android.server.wifi.util.WifiPermissionsUtil; +import com.android.wifi.R; import org.junit.After; import org.junit.Before; diff --git a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java index f4b47776e..7c3bdf2d7 100644 --- a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java @@ -87,7 +87,6 @@ import android.util.Pair; import androidx.test.filters.SmallTest; import com.android.dx.mockito.inline.extended.ExtendedMockito; -import com.android.internal.R; import com.android.internal.util.AsyncChannel; import com.android.internal.util.IState; import com.android.internal.util.StateMachine; @@ -101,6 +100,7 @@ import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiIsUnusableEvent; import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiUsabilityStats; import com.android.server.wifi.util.WifiPermissionsUtil; import com.android.server.wifi.util.WifiPermissionsWrapper; +import com.android.wifi.R; import org.junit.After; import org.junit.Before; diff --git a/tests/wifitests/src/com/android/server/wifi/DeviceConfigFacadeTest.java b/tests/wifitests/src/com/android/server/wifi/DeviceConfigFacadeTest.java index 1c04b7439..e23d402aa 100644 --- a/tests/wifitests/src/com/android/server/wifi/DeviceConfigFacadeTest.java +++ b/tests/wifitests/src/com/android/server/wifi/DeviceConfigFacadeTest.java @@ -32,7 +32,7 @@ import android.provider.DeviceConfig.OnPropertiesChangedListener; import androidx.test.filters.SmallTest; import com.android.dx.mockito.inline.extended.ExtendedMockito; -import com.android.internal.R; +import com.android.wifi.R; import org.junit.After; import org.junit.Before; diff --git a/tests/wifitests/src/com/android/server/wifi/HostapdHalTest.java b/tests/wifitests/src/com/android/server/wifi/HostapdHalTest.java index e2a32272f..8a5d4deae 100644 --- a/tests/wifitests/src/com/android/server/wifi/HostapdHalTest.java +++ b/tests/wifitests/src/com/android/server/wifi/HostapdHalTest.java @@ -38,8 +38,8 @@ import android.os.test.TestLooper; import androidx.test.filters.SmallTest; -import com.android.internal.R; import com.android.server.wifi.util.NativeUtil; +import com.android.wifi.R; import org.junit.Before; import org.junit.Test; diff --git a/tests/wifitests/src/com/android/server/wifi/LinkProbeManagerTest.java b/tests/wifitests/src/com/android/server/wifi/LinkProbeManagerTest.java index 91692be32..46b0ba067 100644 --- a/tests/wifitests/src/com/android/server/wifi/LinkProbeManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/LinkProbeManagerTest.java @@ -37,7 +37,7 @@ import android.provider.Settings; import androidx.test.filters.SmallTest; -import com.android.internal.R; +import com.android.wifi.R; import org.junit.Before; import org.junit.Test; diff --git a/tests/wifitests/src/com/android/server/wifi/SarManagerTest.java b/tests/wifitests/src/com/android/server/wifi/SarManagerTest.java index 39f4d6a0e..85eecbc0c 100644 --- a/tests/wifitests/src/com/android/server/wifi/SarManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/SarManagerTest.java @@ -40,7 +40,7 @@ import android.telephony.TelephonyManager; import androidx.test.filters.SmallTest; -import com.android.internal.R; +import com.android.wifi.R; import org.junit.After; import org.junit.Before; diff --git a/tests/wifitests/src/com/android/server/wifi/SavedNetworkEvaluatorTest.java b/tests/wifitests/src/com/android/server/wifi/SavedNetworkEvaluatorTest.java index 19f7422ec..b14f210f6 100644 --- a/tests/wifitests/src/com/android/server/wifi/SavedNetworkEvaluatorTest.java +++ b/tests/wifitests/src/com/android/server/wifi/SavedNetworkEvaluatorTest.java @@ -31,10 +31,9 @@ import android.telephony.SubscriptionManager; import android.test.suitebuilder.annotation.SmallTest; import android.util.LocalLog; - -import com.android.internal.R; import com.android.server.wifi.WifiNetworkSelector.NetworkEvaluator.OnConnectableListener; import com.android.server.wifi.WifiNetworkSelectorTestUtil.ScanDetailsAndWifiConfigs; +import com.android.wifi.R; import org.junit.After; import org.junit.Before; diff --git a/tests/wifitests/src/com/android/server/wifi/ScoringParamsTest.java b/tests/wifitests/src/com/android/server/wifi/ScoringParamsTest.java index a6a3b0f76..3fefb443c 100644 --- a/tests/wifitests/src/com/android/server/wifi/ScoringParamsTest.java +++ b/tests/wifitests/src/com/android/server/wifi/ScoringParamsTest.java @@ -35,7 +35,7 @@ import android.provider.Settings; import androidx.test.filters.SmallTest; -import com.android.internal.R; +import com.android.wifi.R; import org.junit.Before; import org.junit.Test; diff --git a/tests/wifitests/src/com/android/server/wifi/SoftApManagerTest.java b/tests/wifitests/src/com/android/server/wifi/SoftApManagerTest.java index a00c1bac6..68c0cf866 100644 --- a/tests/wifitests/src/com/android/server/wifi/SoftApManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/SoftApManagerTest.java @@ -64,10 +64,10 @@ import android.provider.Settings; import androidx.test.filters.SmallTest; -import com.android.internal.R; import com.android.internal.util.WakeupMessage; import com.android.server.wifi.wificond.IApInterfaceEventCallback; import com.android.server.wifi.wificond.NativeWifiClient; +import com.android.wifi.R; import org.junit.Before; import org.junit.Test; diff --git a/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java b/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java index 101331868..a9436e7e1 100644 --- a/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java +++ b/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java @@ -46,8 +46,8 @@ import android.text.TextUtils; import androidx.test.filters.SmallTest; -import com.android.internal.R; import com.android.server.wifi.util.NativeUtil; +import com.android.wifi.R; import org.junit.Before; import org.junit.Test; diff --git a/tests/wifitests/src/com/android/server/wifi/VelocityBasedConnectedScoreTest.java b/tests/wifitests/src/com/android/server/wifi/VelocityBasedConnectedScoreTest.java index 1de160084..ae8c8c0d5 100644 --- a/tests/wifitests/src/com/android/server/wifi/VelocityBasedConnectedScoreTest.java +++ b/tests/wifitests/src/com/android/server/wifi/VelocityBasedConnectedScoreTest.java @@ -26,7 +26,7 @@ import android.net.wifi.WifiInfo; import androidx.test.filters.SmallTest; -import com.android.internal.R; +import com.android.wifi.R; import org.junit.Before; import org.junit.Test; diff --git a/tests/wifitests/src/com/android/server/wifi/WifiApConfigStoreTest.java b/tests/wifitests/src/com/android/server/wifi/WifiApConfigStoreTest.java index 774af4de0..3d78e1e46 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiApConfigStoreTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiApConfigStoreTest.java @@ -43,8 +43,8 @@ import android.os.test.TestLooper; import androidx.test.filters.SmallTest; -import com.android.internal.R; import com.android.internal.messages.nano.SystemMessageProto.SystemMessage; +import com.android.wifi.R; import org.junit.After; import org.junit.Before; diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java index 74f102652..14a17b877 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java @@ -49,10 +49,10 @@ import android.util.Pair; import androidx.test.filters.SmallTest; import com.android.dx.mockito.inline.extended.ExtendedMockito; -import com.android.internal.R; import com.android.server.wifi.util.TelephonyUtil; import com.android.server.wifi.util.WifiPermissionsUtil; import com.android.server.wifi.util.WifiPermissionsWrapper; +import com.android.wifi.R; import org.junit.After; import org.junit.Before; diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java index 3e9e0a6a3..fb80b23dd 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java @@ -51,7 +51,7 @@ import android.util.LocalLog; import androidx.test.filters.SmallTest; -import com.android.internal.R; +import com.android.wifi.R; import org.junit.After; import org.junit.Before; diff --git a/tests/wifitests/src/com/android/server/wifi/WifiDiagnosticsTest.java b/tests/wifitests/src/com/android/server/wifi/WifiDiagnosticsTest.java index e4b1d7029..e5c91cb12 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiDiagnosticsTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiDiagnosticsTest.java @@ -39,8 +39,8 @@ import android.content.Context; import androidx.test.filters.SmallTest; -import com.android.internal.R; import com.android.server.am.ActivityManagerService; +import com.android.wifi.R; import org.junit.Before; import org.junit.Ignore; diff --git a/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java b/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java index bf610c2c9..f576d2ce3 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java @@ -39,9 +39,9 @@ import android.util.LocalLog; import androidx.test.filters.SmallTest; -import com.android.internal.R; import com.android.server.wifi.WifiNetworkSelectorTestUtil.ScanDetailsAndWifiConfigs; import com.android.server.wifi.proto.nano.WifiMetricsProto; +import com.android.wifi.R; import org.junit.After; import org.junit.Before; diff --git a/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java index 5755c5858..b94a37511 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java @@ -55,12 +55,12 @@ import android.os.UserHandle; import android.os.test.TestLooper; import android.test.suitebuilder.annotation.SmallTest; -import com.android.internal.R; import com.android.internal.messages.nano.SystemMessageProto.SystemMessage; import com.android.server.wifi.WifiNetworkSuggestionsManager.ExtendedWifiNetworkSuggestion; import com.android.server.wifi.WifiNetworkSuggestionsManager.PerAppInfo; import com.android.server.wifi.hotspot2.PasspointManager; import com.android.server.wifi.util.WifiPermissionsUtil; +import com.android.wifi.R; import org.junit.Before; import org.junit.Test; diff --git a/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java b/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java index 2ed9e420f..f80201bac 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java @@ -38,7 +38,7 @@ import android.net.wifi.WifiInfo; import androidx.test.filters.SmallTest; -import com.android.internal.R; +import com.android.wifi.R; import org.junit.After; import org.junit.Before; diff --git a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java index a436d97c2..cac9cbd44 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java @@ -1646,7 +1646,7 @@ public class WifiServiceImplTest extends WifiBaseTest { @Test public void testStartLocalOnlyHotspotAt5Ghz() { when(mResources.getBoolean( - eq(com.android.internal.R.bool.config_wifi_local_only_hotspot_5ghz))) + eq(com.android.wifi.R.bool.config_wifi_local_only_hotspot_5ghz))) .thenReturn(true); when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)).thenReturn(true); when(mClientModeImpl.syncGetSupportedFeatures(any(AsyncChannel.class))) @@ -3196,7 +3196,7 @@ public class WifiServiceImplTest extends WifiBaseTest { @Test public void testNeeds5GHzToAnyApBandConversionReturnedTrue() { when(mResources.getBoolean( - eq(com.android.internal.R.bool.config_wifi_convert_apband_5ghz_to_any))) + eq(com.android.wifi.R.bool.config_wifi_convert_apband_5ghz_to_any))) .thenReturn(true); assertTrue(mWifiServiceImpl.needs5GHzToAnyApBandConversion()); @@ -3211,7 +3211,7 @@ public class WifiServiceImplTest extends WifiBaseTest { @Test public void testNeeds5GHzToAnyApBandConversionReturnedFalse() { when(mResources.getBoolean( - eq(com.android.internal.R.bool.config_wifi_convert_apband_5ghz_to_any))) + eq(com.android.wifi.R.bool.config_wifi_convert_apband_5ghz_to_any))) .thenReturn(false); assertFalse(mWifiServiceImpl.needs5GHzToAnyApBandConversion()); @@ -4120,7 +4120,7 @@ public class WifiServiceImplTest extends WifiBaseTest { private void setupMaxApInterfaces(int val) { when(mResources.getInteger( - eq(com.android.internal.R.integer.config_wifi_max_ap_interfaces))) + eq(com.android.wifi.R.integer.config_wifi_max_ap_interfaces))) .thenReturn(val); } diff --git a/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java b/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java index 483b60686..bc51b6d4b 100644 --- a/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java @@ -74,7 +74,6 @@ import android.provider.Settings; import androidx.test.filters.SmallTest; -import com.android.internal.R; import com.android.server.wifi.FakeWifiLog; import com.android.server.wifi.FrameworkFacade; import com.android.server.wifi.HalDeviceManager; @@ -83,6 +82,7 @@ import com.android.server.wifi.WifiInjector; import com.android.server.wifi.proto.nano.WifiMetricsProto.P2pConnectionEvent; import com.android.server.wifi.util.WifiPermissionsUtil; import com.android.server.wifi.util.WifiPermissionsWrapper; +import com.android.wifi.R; import org.junit.Before; import org.junit.Test; diff --git a/tests/wifitests/src/com/android/server/wifi/scanner/WificondPnoScannerTest.java b/tests/wifitests/src/com/android/server/wifi/scanner/WificondPnoScannerTest.java index e4b6ec578..ad66e55ab 100644 --- a/tests/wifitests/src/com/android/server/wifi/scanner/WificondPnoScannerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/scanner/WificondPnoScannerTest.java @@ -30,7 +30,6 @@ import android.os.test.TestLooper; import androidx.test.filters.SmallTest; -import com.android.internal.R; import com.android.server.wifi.Clock; import com.android.server.wifi.MockResources; import com.android.server.wifi.MockWifiMonitor; @@ -39,6 +38,7 @@ import com.android.server.wifi.WifiBaseTest; import com.android.server.wifi.WifiMonitor; import com.android.server.wifi.WifiNative; import com.android.server.wifi.scanner.ChannelHelper.ChannelCollection; +import com.android.wifi.R; import org.junit.Before; import org.junit.Test; |