Disable DataConnection RealTimeInfo
Nathan Harold [Tue, 18 Aug 2015 20:52:06 +0000 (13:52 -0700)]
TelephonyManager.listen() registrants will
no longer receive any events via PhoneStateListener
from LISTEN_DATA_CONNECTION_REAL_TIME_INFO.

bug: 22414044
bug: 23182647

Change-Id: If0ad88125a1e1334a3ebc86c9b03d89af6c3943c

src/java/com/android/internal/telephony/dataconnection/DcController.java

index 39c25ff..98d1c3b 100644 (file)
@@ -379,28 +379,28 @@ class DcController extends StateMachine {
                 }
             }
 
-            // Temporary notification until RIL implementation is complete.
-            if (mOverallDataConnectionActiveState != newOverallDataConnectionActiveState) {
-                mOverallDataConnectionActiveState = newOverallDataConnectionActiveState;
-                long time = SystemClock.elapsedRealtimeNanos();
-                int dcPowerState;
-                switch (mOverallDataConnectionActiveState) {
-                    case DATA_CONNECTION_ACTIVE_PH_LINK_INACTIVE:
-                    case DATA_CONNECTION_ACTIVE_PH_LINK_DORMANT:
-                        dcPowerState = DataConnectionRealTimeInfo.DC_POWER_STATE_LOW;
-                        break;
-                    case DATA_CONNECTION_ACTIVE_PH_LINK_UP:
-                        dcPowerState = DataConnectionRealTimeInfo.DC_POWER_STATE_HIGH;
-                        break;
-                    default:
-                        dcPowerState = DataConnectionRealTimeInfo.DC_POWER_STATE_UNKNOWN;
-                        break;
-                }
-                DataConnectionRealTimeInfo dcRtInfo =
-                        new DataConnectionRealTimeInfo(time , dcPowerState);
-                log("onDataStateChanged: notify DcRtInfo changed dcRtInfo=" + dcRtInfo);
-                mPhone.notifyDataConnectionRealTimeInfo(dcRtInfo);
-            }
+            // TODO: b/23319188 Enable/Disable this based on enable/disable of dormancy indications 
+            //if (mOverallDataConnectionActiveState != newOverallDataConnectionActiveState) {
+            //    mOverallDataConnectionActiveState = newOverallDataConnectionActiveState;
+            //    long time = SystemClock.elapsedRealtimeNanos();
+            //    int dcPowerState;
+            //    switch (mOverallDataConnectionActiveState) {
+            //        case DATA_CONNECTION_ACTIVE_PH_LINK_INACTIVE:
+            //        case DATA_CONNECTION_ACTIVE_PH_LINK_DORMANT:
+            //            dcPowerState = DataConnectionRealTimeInfo.DC_POWER_STATE_LOW;
+            //            break;
+            //        case DATA_CONNECTION_ACTIVE_PH_LINK_UP:
+            //            dcPowerState = DataConnectionRealTimeInfo.DC_POWER_STATE_HIGH;
+            //            break;
+            //        default:
+            //            dcPowerState = DataConnectionRealTimeInfo.DC_POWER_STATE_UNKNOWN;
+            //            break;
+            //    }
+            //    DataConnectionRealTimeInfo dcRtInfo =
+            //            new DataConnectionRealTimeInfo(time , dcPowerState);
+            //    log("onDataStateChanged: notify DcRtInfo changed dcRtInfo=" + dcRtInfo);
+            //    mPhone.notifyDataConnectionRealTimeInfo(dcRtInfo); 
+            //}
 
             if (DBG) {
                 lr("onDataStateChanged: dcsToRetry=" + dcsToRetry