Maintain NITZ info in RILJ so that it can be used even after phone type is switched.
Amit Mahajan [Wed, 12 Nov 2014 23:46:00 +0000 (15:46 -0800)]
Bug: 18071327
Change-Id: Ib1aa4ab375219dc37e51e5cbe430de5cec5eadce

src/java/com/android/internal/telephony/RIL.java

index cddeb03..a0e73f9 100644 (file)
@@ -676,7 +676,6 @@ public final class RIL extends BaseCommands implements CommandsInterface {
             mNITZTimeRegistrant
                 .notifyRegistrant(
                     new AsyncResult (null, mLastNITZTimeInfo, null));
-            mLastNITZTimeInfo = null;
         }
     }
 
@@ -2868,10 +2867,10 @@ public final class RIL extends BaseCommands implements CommandsInterface {
 
                         mNITZTimeRegistrant
                             .notifyRegistrant(new AsyncResult (null, result, null));
-                    } else {
-                        // in case NITZ time registrant isnt registered yet
-                        mLastNITZTimeInfo = result;
                     }
+                    // in case NITZ time registrant isn't registered yet, or a new registrant
+                    // registers later
+                    mLastNITZTimeInfo = result;
                 }
             break;