resolve merge conflicts of 48bc4c1f420d to stage-aosp-master
Change-Id: I41889b0497463e8a63cf2d1e983e7e54298c5c2e
diff --git a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
index 7480ad1..28586eb 100644
--- a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
+++ b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
@@ -47,9 +47,6 @@
import android.widget.ProgressBar;
import android.widget.TextView;
-import com.android.internal.logging.MetricsLogger;
-import com.android.internal.logging.MetricsProto.MetricsEvent;
-
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
@@ -67,14 +64,7 @@
private static final int SOCKET_TIMEOUT_MS = 10000;
- private enum Result {
- DISMISSED(MetricsEvent.ACTION_CAPTIVE_PORTAL_LOGIN_RESULT_DISMISSED),
- UNWANTED(MetricsEvent.ACTION_CAPTIVE_PORTAL_LOGIN_RESULT_UNWANTED),
- WANTED_AS_IS(MetricsEvent.ACTION_CAPTIVE_PORTAL_LOGIN_RESULT_WANTED_AS_IS);
-
- final int metricsEvent;
- Result(int metricsEvent) { this.metricsEvent = metricsEvent; }
- };
+ private enum Result { DISMISSED, UNWANTED, WANTED_AS_IS };
private URL mUrl;
private String mUserAgent;
@@ -90,9 +80,6 @@
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
-
- logMetricsEvent(MetricsEvent.ACTION_CAPTIVE_PORTAL_LOGIN_ACTIVITY);
-
mCm = ConnectivityManager.from(this);
mNetwork = getIntent().getParcelableExtra(ConnectivityManager.EXTRA_NETWORK);
mCaptivePortal = getIntent().getParcelableExtra(ConnectivityManager.EXTRA_CAPTIVE_PORTAL);
@@ -189,7 +176,6 @@
if (DBG) {
Log.d(TAG, String.format("Result %s for %s", result.name(), mUrl.toString()));
}
- logMetricsEvent(result.metricsEvent);
switch (result) {
case DISMISSED:
mCaptivePortal.reportCaptivePortalDismissed();
@@ -398,7 +384,6 @@
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
- logMetricsEvent(MetricsEvent.CAPTIVE_PORTAL_LOGIN_ACTIVITY_SSL_ERROR);
Log.w(TAG, "SSL error (error: " + error.getPrimaryError() + " host: " +
// Only show host to avoid leaking private info.
Uri.parse(error.getUrl()).getHost() + " certificate: " +
@@ -510,8 +495,4 @@
}
return url.getHost();
}
-
- private void logMetricsEvent(int event) {
- MetricsLogger.action(this, event, getPackageName());
- }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
index 024c1a0..03c46e8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
@@ -223,7 +223,8 @@
String contentDescription = getStringIfExists(getContentDescription());
String dataContentDescription = getStringIfExists(icons.mDataContentDescription);
- final boolean dataDisabled = isDataDisabled() && mCurrentState.userSetup;
+ final boolean dataDisabled = mCurrentState.iconGroup == TelephonyIcons.DATA_DISABLED
+ && mCurrentState.userSetup;
// Show icon in QS when we are connected or data is disabled.
boolean showDataIcon = mCurrentState.dataConnected || dataDisabled;
@@ -403,7 +404,7 @@
mCurrentState.roaming = isRoaming();
if (isCarrierNetworkChangeActive()) {
mCurrentState.iconGroup = TelephonyIcons.CARRIER_NETWORK_CHANGE;
- } else if (isDataDisabled() && !mConfig.alwaysShowDataRatIcon) {
+ } else if (isDataDisabled()) {
mCurrentState.iconGroup = TelephonyIcons.DATA_DISABLED;
}
if (isEmergencyOnly() != mCurrentState.isEmergency) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
index dd1a4c5..2f7cd00 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
@@ -28,9 +28,7 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
-import android.os.PersistableBundle;
import android.provider.Settings;
-import android.telephony.CarrierConfigManager;
import android.telephony.ServiceState;
import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionManager;
@@ -221,7 +219,6 @@
filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
filter.addAction(ConnectivityManager.INET_CONDITION_ACTION);
filter.addAction(Intent.ACTION_AIRPLANE_MODE_CHANGED);
- filter.addAction(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED);
mContext.registerReceiver(this, filter, null, mReceiverHandler);
mListening = true;
@@ -399,14 +396,6 @@
// emergency state.
recalculateEmergency();
}
- } else if (action.equals(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED)) {
- mConfig = Config.readConfig(mContext);
- mReceiverHandler.post(new Runnable() {
- @Override
- public void run() {
- handleConfigurationChanged();
- }
- });
} else {
int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY,
SubscriptionManager.INVALID_SUBSCRIPTION_ID);
@@ -915,7 +904,6 @@
boolean show4gForLte = false;
boolean hideLtePlus = false;
boolean hspaDataDistinguishable;
- boolean alwaysShowDataRatIcon = false;
static Config readConfig(Context context) {
Config config = new Config();
@@ -928,14 +916,6 @@
config.hspaDataDistinguishable =
res.getBoolean(R.bool.config_hspa_data_distinguishable);
config.hideLtePlus = res.getBoolean(R.bool.config_hideLtePlus);
-
- CarrierConfigManager configMgr = (CarrierConfigManager)
- context.getSystemService(Context.CARRIER_CONFIG_SERVICE);
- PersistableBundle b = configMgr.getConfig();
- if (b != null) {
- config.alwaysShowDataRatIcon = b.getBoolean(
- CarrierConfigManager.KEY_ALWAYS_SHOW_DATA_RAT_ICON_BOOL);
- }
return config;
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java
index 93e1e6c..fce1172 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java
@@ -110,21 +110,6 @@
verifyDataIndicators(0, 0);
}
- public void testAlwaysShowDataRatIcon() {
- setupDefaultSignal();
- Mockito.when(mMockTm.getDataEnabled(mSubId)).thenReturn(false);
- updateDataConnectionState(TelephonyManager.DATA_DISCONNECTED,
- TelephonyManager.NETWORK_TYPE_GSM);
-
- // Switch to showing data RAT icon when data is diconnected
- // and re-initialize the NetworkController.
- mConfig.alwaysShowDataRatIcon = true;
- mNetworkController.handleConfigurationChanged();
-
- verifyDataIndicators(TelephonyIcons.DATA_G[1][0 /* No direction */],
- TelephonyIcons.QS_DATA_G);
- }
-
public void test4gDataIconConfigChange() {
setupDefaultSignal();
updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
diff --git a/proto/src/metrics_constants.proto b/proto/src/metrics_constants.proto
index 58f1cd8..8bc7520 100644
--- a/proto/src/metrics_constants.proto
+++ b/proto/src/metrics_constants.proto
@@ -2278,11 +2278,6 @@
// OS: O DR
ACTION_WIFI_SIGNIN = 1008;
- // CaptivePortalLoginActivity displays SSL error page
- // CATEGORY: GLOBAL_SYSTEM_UI
- // OS: O DR
- CAPTIVE_PORTAL_LOGIN_ACTIVITY_SSL_ERROR = 1013;
-
// Add new aosp constants above this line.
// END OF AOSP CONSTANTS
}
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index e3d66e7..f96b26c 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -895,12 +895,6 @@
public static final String KEY_STK_DISABLE_LAUNCH_BROWSER_BOOL =
"stk_disable_launch_browser_bool";
- /**
- * Boolean indicating if show data RAT icon on status bar even when data is disabled
- * @hide
- */
- public static final String KEY_ALWAYS_SHOW_DATA_RAT_ICON_BOOL =
- "always_show_data_rat_icon_bool";
// These variables are used by the MMS service and exposed through another API, {@link
// SmsManager}. The variable names and string values are copied from there.
@@ -1582,7 +1576,6 @@
sDefaults.putInt(KEY_LTE_EARFCNS_RSRP_BOOST_INT, 0);
sDefaults.putStringArray(KEY_BOOSTED_LTE_EARFCNS_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_DISABLE_VOICE_BARRING_NOTIFICATION_BOOL, false);
- sDefaults.putBoolean(KEY_ALWAYS_SHOW_DATA_RAT_ICON_BOOL, false);
}
/**
diff --git a/tests/net/java/com/android/server/connectivity/IpConnectivityEventBuilderTest.java b/tests/net/java/com/android/server/connectivity/IpConnectivityEventBuilderTest.java
index 8c16dbb..011e505 100644
--- a/tests/net/java/com/android/server/connectivity/IpConnectivityEventBuilderTest.java
+++ b/tests/net/java/com/android/server/connectivity/IpConnectivityEventBuilderTest.java
@@ -58,6 +58,8 @@
String want = joinLines(
"dropped_events: 0",
"events <",
+ " time_ms: 1",
+ " transport: 0",
" default_network_event <",
" network_id <",
" network_id: 102",
@@ -70,8 +72,6 @@
" transport_types: 2",
" transport_types: 3",
" >",
- " time_ms: 1",
- " transport: 0",
">",
"version: 2");
@@ -89,14 +89,13 @@
String want = joinLines(
"dropped_events: 0",
"events <",
+ " time_ms: 1",
+ " transport: 0",
" dhcp_event <",
" duration_ms: 192",
- " error_code: 0",
" if_name: \"wlan0\"",
" state_transition: \"SomeState\"",
" >",
- " time_ms: 1",
- " transport: 0",
">",
"version: 2");
@@ -113,14 +112,13 @@
String want = joinLines(
"dropped_events: 0",
"events <",
- " dhcp_event <",
- " duration_ms: 0",
- " error_code: 50397184",
- " if_name: \"wlan0\"",
- " state_transition: \"\"",
- " >",
" time_ms: 1",
" transport: 0",
+ " dhcp_event <",
+ " duration_ms: 0",
+ " if_name: \"wlan0\"",
+ " error_code: 50397184",
+ " >",
">",
"version: 2");
@@ -139,6 +137,8 @@
String want = joinLines(
"dropped_events: 0",
"events <",
+ " time_ms: 1",
+ " transport: 0",
" dns_lookup_batch <",
" event_types: 1",
" event_types: 1",
@@ -168,8 +168,6 @@
" return_codes: 200",
" return_codes: 178",
" >",
- " time_ms: 1",
- " transport: 0",
">",
"version: 2");
@@ -187,13 +185,13 @@
String want = joinLines(
"dropped_events: 0",
"events <",
+ " time_ms: 1",
+ " transport: 0",
" ip_provisioning_event <",
" event_type: 1",
" if_name: \"wlan0\"",
" latency_ms: 5678",
" >",
- " time_ms: 1",
- " transport: 0",
">",
"version: 2");
@@ -210,12 +208,12 @@
String want = joinLines(
"dropped_events: 0",
"events <",
+ " time_ms: 1",
+ " transport: 0",
" ip_reachability_event <",
" event_type: 512",
" if_name: \"wlan0\"",
" >",
- " time_ms: 1",
- " transport: 0",
">",
"version: 2");
@@ -233,6 +231,8 @@
String want = joinLines(
"dropped_events: 0",
"events <",
+ " time_ms: 1",
+ " transport: 0",
" network_event <",
" event_type: 5",
" latency_ms: 20410",
@@ -240,8 +240,6 @@
" network_id: 100",
" >",
" >",
- " time_ms: 1",
- " transport: 0",
">",
"version: 2");
@@ -289,6 +287,8 @@
String want = joinLines(
"dropped_events: 0",
"events <",
+ " time_ms: 1",
+ " transport: 0",
" apf_program_event <",
" current_ras: 9",
" drop_multicast: true",
@@ -297,8 +297,6 @@
" lifetime: 200",
" program_length: 2048",
" >",
- " time_ms: 1",
- " transport: 0",
">",
"version: 2");
@@ -321,6 +319,8 @@
String want = joinLines(
"dropped_events: 0",
"events <",
+ " time_ms: 1",
+ " transport: 0",
" apf_statistics <",
" dropped_ras: 2",
" duration_ms: 45000",
@@ -331,8 +331,6 @@
" received_ras: 10",
" zero_lifetime_ras: 1",
" >",
- " time_ms: 1",
- " transport: 0",
">",
"version: 2");
@@ -353,6 +351,8 @@
String want = joinLines(
"dropped_events: 0",
"events <",
+ " time_ms: 1",
+ " transport: 0",
" ra_event <",
" dnssl_lifetime: -1",
" prefix_preferred_lifetime: 300",
@@ -361,8 +361,6 @@
" route_info_lifetime: -1",
" router_lifetime: 2000",
" >",
- " time_ms: 1",
- " transport: 0",
">",
"version: 2");
diff --git a/tests/net/java/com/android/server/connectivity/IpConnectivityMetricsTest.java b/tests/net/java/com/android/server/connectivity/IpConnectivityMetricsTest.java
index 9a33cde..450653c 100644
--- a/tests/net/java/com/android/server/connectivity/IpConnectivityMetricsTest.java
+++ b/tests/net/java/com/android/server/connectivity/IpConnectivityMetricsTest.java
@@ -158,24 +158,25 @@
String want = joinLines(
"dropped_events: 0",
"events <",
+ " time_ms: 100",
+ " transport: 0",
" ip_reachability_event <",
" event_type: 512",
" if_name: \"wlan0\"",
" >",
- " time_ms: 100",
- " transport: 0",
">",
"events <",
+ " time_ms: 200",
+ " transport: 0",
" dhcp_event <",
" duration_ms: 192",
- " error_code: 0",
" if_name: \"wlan0\"",
" state_transition: \"SomeState\"",
" >",
- " time_ms: 200",
- " transport: 0",
">",
"events <",
+ " time_ms: 300",
+ " transport: 0",
" default_network_event <",
" network_id <",
" network_id: 102",
@@ -188,17 +189,15 @@
" transport_types: 2",
" transport_types: 3",
" >",
- " time_ms: 300",
- " transport: 0",
">",
"events <",
+ " time_ms: 400",
+ " transport: 0",
" ip_provisioning_event <",
" event_type: 1",
" if_name: \"wlan0\"",
" latency_ms: 5678",
" >",
- " time_ms: 400",
- " transport: 0",
">",
"events <",
" time_ms: 500",
@@ -213,6 +212,8 @@
" >",
">",
"events <",
+ " time_ms: 600",
+ " transport: 0",
" apf_statistics <",
" dropped_ras: 2",
" duration_ms: 45000",
@@ -223,10 +224,10 @@
" received_ras: 10",
" zero_lifetime_ras: 1",
" >",
- " time_ms: 600",
- " transport: 0",
">",
"events <",
+ " time_ms: 700",
+ " transport: 0",
" ra_event <",
" dnssl_lifetime: -1",
" prefix_preferred_lifetime: 300",
@@ -235,8 +236,6 @@
" route_info_lifetime: -1",
" router_lifetime: 2000",
" >",
- " time_ms: 700",
- " transport: 0",
">",
"version: 2");
diff --git a/tests/net/java/com/android/server/connectivity/NetdEventListenerServiceTest.java b/tests/net/java/com/android/server/connectivity/NetdEventListenerServiceTest.java
index 6c8babb..97afa60 100644
--- a/tests/net/java/com/android/server/connectivity/NetdEventListenerServiceTest.java
+++ b/tests/net/java/com/android/server/connectivity/NetdEventListenerServiceTest.java
@@ -212,6 +212,8 @@
IpConnectivityEvent got = events.get(0);
String want = joinLines(
+ "time_ms: 0",
+ "transport: 0",
"connect_statistics <",
" connect_count: 12",
" errnos_counters <",
@@ -245,10 +247,7 @@
" latencies_ms: 67",
" latencies_ms: 110",
" latencies_ms: 214",
- " latencies_ms: 523",
- ">",
- "time_ms: 0",
- "transport: 0");
+ " latencies_ms: 523");
verifyConnectEvent(want, got);
}