Replace Rlog with Log temporarily

Test: manual
Bug: 135956699
Change-Id: I112457f83e5d43ca0d3d18a3ba384a5763e5e403
diff --git a/src/com/android/cellbroadcastservice/BearerData.java b/src/com/android/cellbroadcastservice/BearerData.java
index d73339c..032266a 100644
--- a/src/com/android/cellbroadcastservice/BearerData.java
+++ b/src/com/android/cellbroadcastservice/BearerData.java
@@ -17,9 +17,9 @@
 package com.android.cellbroadcastservice;
 
 import android.content.Context;
-import android.telephony.Rlog;
 import android.telephony.SmsCbCmasInfo;
 import android.telephony.cdma.CdmaSmsCbProgramData;
+import android.util.Log;
 
 /**
  * An object to decode CDMA SMS bearer data.
@@ -194,7 +194,7 @@
             inStream.skip(3);
         }
         if ((!decodeSuccess) || (paramBits > 0)) {
-            Rlog.d(LOG_TAG, "MESSAGE_IDENTIFIER decode "
+            Log.d(LOG_TAG, "MESSAGE_IDENTIFIER decode "
                     + (decodeSuccess ? "succeeded" : "failed")
                     + " (extra bits = " + paramBits + ")");
         }
@@ -211,7 +211,7 @@
             decodeSuccess = true;
             inStream.skip(paramBits);
         }
-        Rlog.d(LOG_TAG, "RESERVED bearer data subparameter " + subparamId + " decode "
+        Log.d(LOG_TAG, "RESERVED bearer data subparameter " + subparamId + " decode "
                 + (decodeSuccess ? "succeeded" : "failed") + " (param bits = " + paramBits + ")");
         if (!decodeSuccess) {
             throw new CodingException("RESERVED bearer data subparameter " + subparamId
@@ -263,7 +263,7 @@
             if (maxNumFields < 0) {
                 throw new CodingException(charset + " decode failed: offset out of range");
             }
-            Rlog.e(LOG_TAG, charset + " decode error: offset = " + offset + " numFields = "
+            Log.e(LOG_TAG, charset + " decode error: offset = " + offset + " numFields = "
                     + numFields + " data.length = " + data.length + " maxNumFields = "
                     + maxNumFields);
             numFields = maxNumFields;
@@ -432,7 +432,7 @@
             bData.language = inStream.read(8);
         }
         if ((!decodeSuccess) || (paramBits > 0)) {
-            Rlog.d(LOG_TAG, "LANGUAGE_INDICATOR decode "
+            Log.d(LOG_TAG, "LANGUAGE_INDICATOR decode "
                     + (decodeSuccess ? "succeeded" : "failed")
                     + " (extra bits = " + paramBits + ")");
         }
@@ -452,7 +452,7 @@
             inStream.skip(6);
         }
         if ((!decodeSuccess) || (paramBits > 0)) {
-            Rlog.d(LOG_TAG, "PRIORITY_INDICATOR decode "
+            Log.d(LOG_TAG, "PRIORITY_INDICATOR decode "
                     + (decodeSuccess ? "succeeded" : "failed")
                     + " (extra bits = " + paramBits + ")");
         }
@@ -553,7 +553,7 @@
                     break;
 
                 default:
-                    Rlog.w(LOG_TAG, "skipping unsupported CMAS record type " + recordType);
+                    Log.w(LOG_TAG, "skipping unsupported CMAS record type " + recordType);
                     inStream.skip(recordLen * 8);
                     break;
             }
@@ -631,9 +631,9 @@
             }
             return bData;
         } catch (BitwiseInputStream.AccessException ex) {
-            Rlog.e(LOG_TAG, "BearerData decode failed: " + ex);
+            Log.e(LOG_TAG, "BearerData decode failed: " + ex);
         } catch (CodingException ex) {
-            Rlog.e(LOG_TAG, "BearerData decode failed: " + ex);
+            Log.e(LOG_TAG, "BearerData decode failed: " + ex);
         }
         return null;
     }
diff --git a/src/com/android/cellbroadcastservice/CbGeoUtils.java b/src/com/android/cellbroadcastservice/CbGeoUtils.java
index 2a7a1d7..0a8fe48 100644
--- a/src/com/android/cellbroadcastservice/CbGeoUtils.java
+++ b/src/com/android/cellbroadcastservice/CbGeoUtils.java
@@ -19,8 +19,8 @@
 import android.annotation.NonNull;
 import android.telephony.CbGeoUtils.Geometry;
 import android.telephony.CbGeoUtils.LatLng;
-import android.telephony.Rlog;
 import android.text.TextUtils;
+import android.util.Log;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -231,7 +231,7 @@
                     geometries.add(new Polygon(vertices));
                     break;
                 default:
-                    Rlog.e(TAG, "Invalid geometry format " + geometryStr);
+                    Log.e(TAG, "Invalid geometry format " + geometryStr);
             }
         }
         return geometries;
@@ -284,7 +284,7 @@
             sb.append("|");
             sb.append(circle.getRadius());
         } else {
-            Rlog.e(TAG, "Unsupported geometry object " + geometry);
+            Log.e(TAG, "Unsupported geometry object " + geometry);
             return null;
         }
         return sb.toString();
diff --git a/src/com/android/cellbroadcastservice/CellBroadcastHandler.java b/src/com/android/cellbroadcastservice/CellBroadcastHandler.java
index 3dfc4d6..6b28342 100644
--- a/src/com/android/cellbroadcastservice/CellBroadcastHandler.java
+++ b/src/com/android/cellbroadcastservice/CellBroadcastHandler.java
@@ -50,12 +50,12 @@
 import android.telephony.CbGeoUtils.Geometry;
 import android.telephony.CbGeoUtils.LatLng;
 import android.telephony.CellBroadcastIntents;
-import android.telephony.Rlog;
 import android.telephony.SmsCbMessage;
 import android.telephony.SubscriptionManager;
 import android.telephony.cdma.CdmaSmsCbProgramData;
 import android.text.TextUtils;
 import android.util.LocalLog;
+import android.util.Log;
 
 import com.android.internal.annotations.VisibleForTesting;
 
@@ -633,14 +633,14 @@
 
             LatLng latLng = null;
             if (location != null) {
-                Rlog.d(TAG, "Got location update");
+                Log.d(TAG, "Got location update");
                 latLng = new LatLng(location.getLatitude(), location.getLongitude());
             } else if (mNumLocationUpdatesInProgress > 0) {
-                Rlog.d(TAG, "Still waiting for " + mNumLocationUpdatesInProgress
+                Log.d(TAG, "Still waiting for " + mNumLocationUpdatesInProgress
                         + " more location updates.");
                 return;
             } else {
-                Rlog.d(TAG, "Location is not available.");
+                Log.d(TAG, "Location is not available.");
             }
 
             for (LocationUpdateCallback callback : mCallbacks) {
@@ -656,10 +656,10 @@
 
         private void requestLocationUpdateInternal(@NonNull LocationUpdateCallback callback,
                 int maximumWaitTimeS) {
-            if (DBG) Rlog.d(TAG, "requestLocationUpdate");
+            if (DBG) Log.d(TAG, "requestLocationUpdate");
             if (!hasPermission(ACCESS_FINE_LOCATION) && !hasPermission(ACCESS_COARSE_LOCATION)) {
                 if (DBG) {
-                    Rlog.d(TAG, "Can't request location update because of no location permission");
+                    Log.d(TAG, "Can't request location update because of no location permission");
                 }
                 callback.onLocationUpdate(null);
                 return;
@@ -668,7 +668,7 @@
                 for (String provider : LOCATION_PROVIDERS) {
                     if (!mLocationManager.isProviderEnabled(provider)) {
                         if (DBG) {
-                            Rlog.d(TAG, "provider " + provider + " not available");
+                            Log.d(TAG, "provider " + provider + " not available");
                         }
                         continue;
                     }
diff --git a/src/com/android/cellbroadcastservice/CellBroadcastProvider.java b/src/com/android/cellbroadcastservice/CellBroadcastProvider.java
index bcf0bcc..c20c0a4 100644
--- a/src/com/android/cellbroadcastservice/CellBroadcastProvider.java
+++ b/src/com/android/cellbroadcastservice/CellBroadcastProvider.java
@@ -27,10 +27,7 @@
 import android.database.sqlite.SQLiteOpenHelper;
 import android.database.sqlite.SQLiteQueryBuilder;
 import android.net.Uri;
-import android.os.Binder;
-import android.os.Process;
 import android.provider.Telephony.CellBroadcasts;
-import android.telephony.Rlog;
 import android.text.TextUtils;
 import android.util.Log;
 
@@ -178,7 +175,7 @@
         checkReadPermission(uri);
 
         if (DBG) {
-            Rlog.d(TAG, "query:"
+            Log.d(TAG, "query:"
                     + " uri = " + uri
                     + " projection = " + Arrays.toString(projection)
                     + " selection = " + selection
@@ -218,7 +215,7 @@
         checkWritePermission();
 
         if (DBG) {
-            Rlog.d(TAG, "insert:"
+            Log.d(TAG, "insert:"
                     + " uri = " + uri
                     + " contentValue = " + values);
         }
@@ -233,7 +230,7 @@
                             .notifyChange(CONTENT_URI, null /* observer */);
                     return newUri;
                 } else {
-                    Rlog.e(TAG, "Insert record failed because of unknown reason, uri = " + uri);
+                    Log.e(TAG, "Insert record failed because of unknown reason, uri = " + uri);
                     return null;
                 }
             default:
@@ -247,7 +244,7 @@
         checkWritePermission();
 
         if (DBG) {
-            Rlog.d(TAG, "delete:"
+            Log.d(TAG, "delete:"
                     + " uri = " + uri
                     + " selection = " + selection
                     + " selectionArgs = " + Arrays.toString(selectionArgs));
@@ -268,7 +265,7 @@
         checkWritePermission();
 
         if (DBG) {
-            Rlog.d(TAG, "update:"
+            Log.d(TAG, "update:"
                     + " uri = " + uri
                     + " values = {" + values + "}"
                     + " selection = " + selection
@@ -375,12 +372,12 @@
         @Override
         public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
             if (DBG) {
-                Rlog.d(TAG, "onUpgrade: oldV=" + oldVersion + " newV=" + newVersion);
+                Log.d(TAG, "onUpgrade: oldV=" + oldVersion + " newV=" + newVersion);
             }
             if (oldVersion < 2) {
                 db.execSQL("ALTER TABLE " + CELL_BROADCASTS_TABLE_NAME + " ADD COLUMN "
                         + CellBroadcasts.SLOT_INDEX + " INTEGER DEFAULT 0;");
-                Rlog.d(TAG, "add slotIndex column");
+                Log.d(TAG, "add slotIndex column");
             }
         }
     }
diff --git a/src/com/android/cellbroadcastservice/DefaultCellBroadcastService.java b/src/com/android/cellbroadcastservice/DefaultCellBroadcastService.java
index bf9653d..bb02f5b 100644
--- a/src/com/android/cellbroadcastservice/DefaultCellBroadcastService.java
+++ b/src/com/android/cellbroadcastservice/DefaultCellBroadcastService.java
@@ -19,12 +19,12 @@
 import android.content.Context;
 import android.os.Bundle;
 import android.telephony.CellBroadcastService;
-import android.telephony.Rlog;
 import android.telephony.SmsCbLocation;
 import android.telephony.SmsCbMessage;
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyManager;
 import android.telephony.cdma.CdmaSmsCbProgramData;
+import android.util.Log;
 
 import com.android.internal.annotations.VisibleForTesting;
 
@@ -59,13 +59,13 @@
 
     @Override
     public void onGsmCellBroadcastSms(int slotIndex, byte[] message) {
-        Rlog.d(TAG, "onGsmCellBroadcastSms received message on slotId=" + slotIndex);
+        Log.d(TAG, "onGsmCellBroadcastSms received message on slotId=" + slotIndex);
         mGsmCellBroadcastHandler.onGsmCellBroadcastSms(slotIndex, message);
     }
 
     @Override
     public void onCdmaCellBroadcastSms(int slotIndex, byte[] bearerData, int serviceCategory) {
-        Rlog.d(TAG, "onCdmaCellBroadcastSms received message on slotId=" + slotIndex);
+        Log.d(TAG, "onCdmaCellBroadcastSms received message on slotId=" + slotIndex);
         int[] subIds =
                 ((SubscriptionManager) getSystemService(
                         Context.TELEPHONY_SUBSCRIPTION_SERVICE)).getSubscriptionIds(slotIndex);
@@ -88,7 +88,7 @@
     @Override
     public void onCdmaScpMessage(int slotIndex, List<CdmaSmsCbProgramData> programData,
             String originatingAddress, Consumer<Bundle> callback) {
-        Rlog.d(TAG, "onCdmaScpMessage received message on slotId=" + slotIndex);
+        Log.d(TAG, "onCdmaScpMessage received message on slotId=" + slotIndex);
         mCdmaScpHandler.onCdmaScpMessage(slotIndex, new ArrayList<>(programData),
                 originatingAddress, callback);
     }
@@ -107,10 +107,10 @@
             int serviceCategory) {
         BearerData bData = BearerData.decode(context, bearerData, serviceCategory);
         if (bData == null) {
-            Rlog.w(TAG, "BearerData.decode() returned null");
+            Log.w(TAG, "BearerData.decode() returned null");
             return null;
         }
-        Rlog.d(TAG, "MT raw BearerData = " + toHexString(bearerData, 0, bearerData.length));
+        Log.d(TAG, "MT raw BearerData = " + toHexString(bearerData, 0, bearerData.length));
         SmsCbLocation location = new SmsCbLocation(plmn, -1, -1);
 
         SubscriptionManager sm = (SubscriptionManager) context.getSystemService(
diff --git a/src/com/android/cellbroadcastservice/GsmAlphabet.java b/src/com/android/cellbroadcastservice/GsmAlphabet.java
index 9c52189..1efb7be 100644
--- a/src/com/android/cellbroadcastservice/GsmAlphabet.java
+++ b/src/com/android/cellbroadcastservice/GsmAlphabet.java
@@ -16,7 +16,7 @@
 
 package com.android.cellbroadcastservice;
 
-import android.telephony.Rlog;
+import android.util.Log;
 import android.util.SparseIntArray;
 
 /**
@@ -579,7 +579,7 @@
         int numTables = sLanguageTables.length;
         int numShiftTables = sLanguageShiftTables.length;
         if (numTables != numShiftTables) {
-            Rlog.e(TAG, "Error: language tables array length " + numTables
+            Log.e(TAG, "Error: language tables array length " + numTables
                     + " != shift tables array length " + numShiftTables);
         }
 
@@ -589,7 +589,7 @@
 
             int tableLen = table.length();
             if (tableLen != 0 && tableLen != 128) {
-                Rlog.e(TAG, "Error: language tables index " + i + " length " + tableLen
+                Log.e(TAG, "Error: language tables index " + i + " length " + tableLen
                         + " (expected 128 or 0)");
             }
 
@@ -607,7 +607,7 @@
 
             int shiftTableLen = shiftTable.length();
             if (shiftTableLen != 0 && shiftTableLen != 128) {
-                Rlog.e(TAG, "Error: language shift tables index " + i + " length " + shiftTableLen
+                Log.e(TAG, "Error: language shift tables index " + i + " length " + shiftTableLen
                         + " (expected 128 or 0)");
             }
 
@@ -659,11 +659,11 @@
         StringBuilder ret = new StringBuilder(lengthSeptets);
 
         if (languageTable < 0 || languageTable > sLanguageTables.length) {
-            Rlog.w(TAG, "unknown language table " + languageTable + ", using default");
+            Log.w(TAG, "unknown language table " + languageTable + ", using default");
             languageTable = 0;
         }
         if (shiftTable < 0 || shiftTable > sLanguageShiftTables.length) {
-            Rlog.w(TAG, "unknown single shift table " + shiftTable + ", using default");
+            Log.w(TAG, "unknown single shift table " + shiftTable + ", using default");
             shiftTable = 0;
         }
 
@@ -673,11 +673,11 @@
             String shiftTableToChar = sLanguageShiftTables[shiftTable];
 
             if (languageTableToChar.isEmpty()) {
-                Rlog.w(TAG, "no language table for code " + languageTable + ", using default");
+                Log.w(TAG, "no language table for code " + languageTable + ", using default");
                 languageTableToChar = sLanguageTables[0];
             }
             if (shiftTableToChar.isEmpty()) {
-                Rlog.w(TAG, "no single shift table for code " + shiftTable + ", using default");
+                Log.w(TAG, "no single shift table for code " + shiftTable + ", using default");
                 shiftTableToChar = sLanguageShiftTables[0];
             }
 
@@ -717,7 +717,7 @@
                 }
             }
         } catch (RuntimeException ex) {
-            Rlog.e(TAG, "Error GSM 7 bit packed: ", ex);
+            Log.e(TAG, "Error GSM 7 bit packed: ", ex);
             return null;
         }
 
diff --git a/src/com/android/cellbroadcastservice/GsmSmsCbMessage.java b/src/com/android/cellbroadcastservice/GsmSmsCbMessage.java
index b91dd19..077f2c6 100644
--- a/src/com/android/cellbroadcastservice/GsmSmsCbMessage.java
+++ b/src/com/android/cellbroadcastservice/GsmSmsCbMessage.java
@@ -27,11 +27,11 @@
 import android.content.res.Resources;
 import android.telephony.CbGeoUtils.Geometry;
 import android.telephony.CbGeoUtils.LatLng;
-import android.telephony.Rlog;
 import android.telephony.SmsCbLocation;
 import android.telephony.SmsCbMessage;
 import android.telephony.SmsMessage;
 import android.telephony.SubscriptionManager;
+import android.util.Log;
 import android.util.Pair;
 
 import com.android.cellbroadcastservice.CbGeoUtils.Circle;
@@ -138,7 +138,7 @@
                 } catch (Exception ex) {
                     // Catch the exception here, the message will be considered as having no WAC
                     // information which means the message will be broadcasted directly.
-                    Rlog.e(TAG, "Can't parse warning area coordinates, ex = " + ex.toString());
+                    Log.e(TAG, "Can't parse warning area coordinates, ex = " + ex.toString());
                 }
             }
 
@@ -205,7 +205,7 @@
             }
             return new GeoFencingTriggerMessage(type, cbIdentifiers);
         } catch (Exception ex) {
-            Rlog.e(TAG, "create geo-fencing trigger failed, ex = " + ex.toString());
+            Log.e(TAG, "create geo-fencing trigger failed, ex = " + ex.toString());
             return null;
         }
     }
diff --git a/src/com/android/cellbroadcastservice/WakeLockStateMachine.java b/src/com/android/cellbroadcastservice/WakeLockStateMachine.java
index 1d08f54..0cb5352 100644
--- a/src/com/android/cellbroadcastservice/WakeLockStateMachine.java
+++ b/src/com/android/cellbroadcastservice/WakeLockStateMachine.java
@@ -23,7 +23,7 @@
 import android.os.Message;
 import android.os.PowerManager;
 import android.os.SystemProperties;
-import android.telephony.Rlog;
+import android.util.Log;
 
 import com.android.internal.util.State;
 import com.android.internal.util.StateMachine;
@@ -235,7 +235,7 @@
      */
     @Override
     protected void log(String s) {
-        Rlog.d(getName(), s);
+        Log.d(getName(), s);
     }
 
     /**
@@ -244,7 +244,7 @@
      */
     @Override
     protected void loge(String s) {
-        Rlog.e(getName(), s);
+        Log.e(getName(), s);
     }
 
     /**
@@ -254,6 +254,6 @@
      */
     @Override
     protected void loge(String s, Throwable e) {
-        Rlog.e(getName(), s, e);
+        Log.e(getName(), s, e);
     }
 }