Switched to Rlog am: 2ae63c3226
am: d1ead412dc
Change-Id: I51e54b2216a46c3b67004ec099f3b6e6c462cfee
diff --git a/src/com/android/cellbroadcastservice/BearerData.java b/src/com/android/cellbroadcastservice/BearerData.java
index cc7a155..d73339c 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,9 +194,9 @@
inStream.skip(3);
}
if ((!decodeSuccess) || (paramBits > 0)) {
- Log.d(LOG_TAG, "MESSAGE_IDENTIFIER decode " +
- (decodeSuccess ? "succeeded" : "failed") +
- " (extra bits = " + paramBits + ")");
+ Rlog.d(LOG_TAG, "MESSAGE_IDENTIFIER decode "
+ + (decodeSuccess ? "succeeded" : "failed")
+ + " (extra bits = " + paramBits + ")");
}
inStream.skip(paramBits);
return decodeSuccess;
@@ -211,7 +211,7 @@
decodeSuccess = true;
inStream.skip(paramBits);
}
- Log.d(LOG_TAG, "RESERVED bearer data subparameter " + subparamId + " decode "
+ Rlog.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");
}
- Log.e(LOG_TAG, charset + " decode error: offset = " + offset + " numFields = "
+ Rlog.e(LOG_TAG, charset + " decode error: offset = " + offset + " numFields = "
+ numFields + " data.length = " + data.length + " maxNumFields = "
+ maxNumFields);
numFields = maxNumFields;
@@ -432,9 +432,9 @@
bData.language = inStream.read(8);
}
if ((!decodeSuccess) || (paramBits > 0)) {
- Log.d(LOG_TAG, "LANGUAGE_INDICATOR decode " +
- (decodeSuccess ? "succeeded" : "failed") +
- " (extra bits = " + paramBits + ")");
+ Rlog.d(LOG_TAG, "LANGUAGE_INDICATOR decode "
+ + (decodeSuccess ? "succeeded" : "failed")
+ + " (extra bits = " + paramBits + ")");
}
inStream.skip(paramBits);
return decodeSuccess;
@@ -452,9 +452,9 @@
inStream.skip(6);
}
if ((!decodeSuccess) || (paramBits > 0)) {
- Log.d(LOG_TAG, "PRIORITY_INDICATOR decode " +
- (decodeSuccess ? "succeeded" : "failed") +
- " (extra bits = " + paramBits + ")");
+ Rlog.d(LOG_TAG, "PRIORITY_INDICATOR decode "
+ + (decodeSuccess ? "succeeded" : "failed")
+ + " (extra bits = " + paramBits + ")");
}
inStream.skip(paramBits);
return decodeSuccess;
@@ -553,7 +553,7 @@
break;
default:
- Log.w(LOG_TAG, "skipping unsupported CMAS record type " + recordType);
+ Rlog.w(LOG_TAG, "skipping unsupported CMAS record type " + recordType);
inStream.skip(recordLen * 8);
break;
}
@@ -631,9 +631,9 @@
}
return bData;
} catch (BitwiseInputStream.AccessException ex) {
- Log.e(LOG_TAG, "BearerData decode failed: " + ex);
+ Rlog.e(LOG_TAG, "BearerData decode failed: " + ex);
} catch (CodingException ex) {
- Log.e(LOG_TAG, "BearerData decode failed: " + ex);
+ Rlog.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 0a8fe48..2a7a1d7 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:
- Log.e(TAG, "Invalid geometry format " + geometryStr);
+ Rlog.e(TAG, "Invalid geometry format " + geometryStr);
}
}
return geometries;
@@ -284,7 +284,7 @@
sb.append("|");
sb.append(circle.getRadius());
} else {
- Log.e(TAG, "Unsupported geometry object " + geometry);
+ Rlog.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 1615f3d..3076c2a 100644
--- a/src/com/android/cellbroadcastservice/CellBroadcastHandler.java
+++ b/src/com/android/cellbroadcastservice/CellBroadcastHandler.java
@@ -45,13 +45,13 @@
import android.provider.Telephony.CellBroadcasts;
import android.telephony.CbGeoUtils.Geometry;
import android.telephony.CbGeoUtils.LatLng;
+import android.telephony.Rlog;
import android.telephony.SmsCbMessage;
import android.telephony.SubscriptionManager;
import android.telephony.cdma.CdmaSmsCbProgramData;
import android.text.TextUtils;
import android.text.format.DateUtils;
import android.util.LocalLog;
-import android.util.Log;
import com.android.internal.annotations.VisibleForTesting;
@@ -643,10 +643,10 @@
private void requestLocationUpdateInternal(@NonNull LocationUpdateCallback callback,
int maximumWaitTimeSec) {
- if (DBG) Log.d(TAG, "requestLocationUpdate");
+ if (DBG) Rlog.d(TAG, "requestLocationUpdate");
if (!isLocationServiceAvailable()) {
if (DBG) {
- Log.d(TAG, "Can't request location update because of no location permission");
+ Rlog.d(TAG, "Can't request location update because of no location permission");
}
callback.onLocationUpdate(null);
return;
@@ -711,14 +711,14 @@
public void handleMessage(Message msg) {
switch (msg.what) {
case EVENT_LOCATION_REQUEST_TIMEOUT:
- if (DBG) Log.d(TAG, "location request timeout");
+ if (DBG) Rlog.d(TAG, "location request timeout");
onLocationUpdate(null);
break;
case EVENT_REQUEST_LOCATION_UPDATE:
requestLocationUpdateInternal((LocationUpdateCallback) msg.obj, msg.arg1);
break;
default:
- Log.e(TAG, "Unsupported message type " + msg.what);
+ Rlog.e(TAG, "Unsupported message type " + msg.what);
}
}
}
diff --git a/src/com/android/cellbroadcastservice/CellBroadcastProvider.java b/src/com/android/cellbroadcastservice/CellBroadcastProvider.java
index e45daca..1369b52 100644
--- a/src/com/android/cellbroadcastservice/CellBroadcastProvider.java
+++ b/src/com/android/cellbroadcastservice/CellBroadcastProvider.java
@@ -31,6 +31,7 @@
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;
@@ -179,7 +180,7 @@
checkReadPermission(uri);
if (DBG) {
- Log.d(TAG, "query:"
+ Rlog.d(TAG, "query:"
+ " uri = " + uri
+ " projection = " + Arrays.toString(projection)
+ " selection = " + selection
@@ -219,7 +220,7 @@
checkWritePermission();
if (DBG) {
- Log.d(TAG, "insert:"
+ Rlog.d(TAG, "insert:"
+ " uri = " + uri
+ " contentValue = " + values);
}
@@ -234,7 +235,7 @@
.notifyChange(CONTENT_URI, null /* observer */);
return newUri;
} else {
- Log.e(TAG, "Insert record failed because of unknown reason, uri = " + uri);
+ Rlog.e(TAG, "Insert record failed because of unknown reason, uri = " + uri);
return null;
}
default:
@@ -248,7 +249,7 @@
checkWritePermission();
if (DBG) {
- Log.d(TAG, "delete:"
+ Rlog.d(TAG, "delete:"
+ " uri = " + uri
+ " selection = " + selection
+ " selectionArgs = " + Arrays.toString(selectionArgs));
@@ -269,7 +270,7 @@
checkWritePermission();
if (DBG) {
- Log.d(TAG, "update:"
+ Rlog.d(TAG, "update:"
+ " uri = " + uri
+ " values = {" + values + "}"
+ " selection = " + selection
@@ -376,12 +377,12 @@
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
if (DBG) {
- Log.d(TAG, "onUpgrade: oldV=" + oldVersion + " newV=" + newVersion);
+ Rlog.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;");
- Log.d(TAG, "add slotIndex column");
+ Rlog.d(TAG, "add slotIndex column");
}
}
}
diff --git a/src/com/android/cellbroadcastservice/DefaultCellBroadcastService.java b/src/com/android/cellbroadcastservice/DefaultCellBroadcastService.java
index 09f0bcd..340d72d 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) {
- Log.d(TAG, "onGsmCellBroadcastSms received message on slotId=" + slotIndex);
+ Rlog.d(TAG, "onGsmCellBroadcastSms received message on slotId=" + slotIndex);
mGsmCellBroadcastHandler.onGsmCellBroadcastSms(slotIndex, message);
}
@Override
public void onCdmaCellBroadcastSms(int slotIndex, byte[] bearerData, int serviceCategory) {
- Log.d(TAG, "onCdmaCellBroadcastSms received message on slotId=" + slotIndex);
+ Rlog.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) {
- Log.d(TAG, "onCdmaScpMessage received message on slotId=" + slotIndex);
+ Rlog.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) {
- Log.w(TAG, "BearerData.decode() returned null");
+ Rlog.w(TAG, "BearerData.decode() returned null");
return null;
}
- Log.d(TAG, "MT raw BearerData = " + toHexString(bearerData, 0, bearerData.length));
+ Rlog.d(TAG, "MT raw BearerData = " + toHexString(bearerData, 0, bearerData.length));
SmsCbLocation location = new SmsCbLocation(plmn);
SubscriptionManager sm = (SubscriptionManager) context.getSystemService(
diff --git a/src/com/android/cellbroadcastservice/GsmAlphabet.java b/src/com/android/cellbroadcastservice/GsmAlphabet.java
index 1efb7be..9c52189 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.util.Log;
+import android.telephony.Rlog;
import android.util.SparseIntArray;
/**
@@ -579,7 +579,7 @@
int numTables = sLanguageTables.length;
int numShiftTables = sLanguageShiftTables.length;
if (numTables != numShiftTables) {
- Log.e(TAG, "Error: language tables array length " + numTables
+ Rlog.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) {
- Log.e(TAG, "Error: language tables index " + i + " length " + tableLen
+ Rlog.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) {
- Log.e(TAG, "Error: language shift tables index " + i + " length " + shiftTableLen
+ Rlog.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) {
- Log.w(TAG, "unknown language table " + languageTable + ", using default");
+ Rlog.w(TAG, "unknown language table " + languageTable + ", using default");
languageTable = 0;
}
if (shiftTable < 0 || shiftTable > sLanguageShiftTables.length) {
- Log.w(TAG, "unknown single shift table " + shiftTable + ", using default");
+ Rlog.w(TAG, "unknown single shift table " + shiftTable + ", using default");
shiftTable = 0;
}
@@ -673,11 +673,11 @@
String shiftTableToChar = sLanguageShiftTables[shiftTable];
if (languageTableToChar.isEmpty()) {
- Log.w(TAG, "no language table for code " + languageTable + ", using default");
+ Rlog.w(TAG, "no language table for code " + languageTable + ", using default");
languageTableToChar = sLanguageTables[0];
}
if (shiftTableToChar.isEmpty()) {
- Log.w(TAG, "no single shift table for code " + shiftTable + ", using default");
+ Rlog.w(TAG, "no single shift table for code " + shiftTable + ", using default");
shiftTableToChar = sLanguageShiftTables[0];
}
@@ -717,7 +717,7 @@
}
}
} catch (RuntimeException ex) {
- Log.e(TAG, "Error GSM 7 bit packed: ", ex);
+ Rlog.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 af948ae..b91dd19 100644
--- a/src/com/android/cellbroadcastservice/GsmSmsCbMessage.java
+++ b/src/com/android/cellbroadcastservice/GsmSmsCbMessage.java
@@ -27,12 +27,12 @@
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.Pair;
-import android.util.Slog;
import com.android.cellbroadcastservice.CbGeoUtils.Circle;
import com.android.cellbroadcastservice.CbGeoUtils.Polygon;
@@ -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.
- Slog.e(TAG, "Can't parse warning area coordinates, ex = " + ex.toString());
+ Rlog.e(TAG, "Can't parse warning area coordinates, ex = " + ex.toString());
}
}
@@ -205,7 +205,7 @@
}
return new GeoFencingTriggerMessage(type, cbIdentifiers);
} catch (Exception ex) {
- Slog.e(TAG, "create geo-fencing trigger failed, ex = " + ex.toString());
+ Rlog.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 1874cef..88bce36 100644
--- a/src/com/android/cellbroadcastservice/WakeLockStateMachine.java
+++ b/src/com/android/cellbroadcastservice/WakeLockStateMachine.java
@@ -24,7 +24,7 @@
import android.os.Message;
import android.os.PowerManager;
import android.os.SystemProperties;
-import android.util.Log;
+import android.telephony.Rlog;
import com.android.internal.util.State;
import com.android.internal.util.StateMachine;
@@ -239,7 +239,7 @@
@UnsupportedAppUsage
@Override
protected void log(String s) {
- Log.d(getName(), s);
+ Rlog.d(getName(), s);
}
/**
@@ -248,7 +248,7 @@
*/
@Override
protected void loge(String s) {
- Log.e(getName(), s);
+ Rlog.e(getName(), s);
}
/**
@@ -258,6 +258,6 @@
*/
@Override
protected void loge(String s, Throwable e) {
- Log.e(getName(), s, e);
+ Rlog.e(getName(), s, e);
}
}
diff --git a/tests/src/com/android/cellbroadcastservice/tests/CdmaSmsMessageTest.java b/tests/src/com/android/cellbroadcastservice/tests/CdmaSmsMessageTest.java
index 171d437..7e34a40 100644
--- a/tests/src/com/android/cellbroadcastservice/tests/CdmaSmsMessageTest.java
+++ b/tests/src/com/android/cellbroadcastservice/tests/CdmaSmsMessageTest.java
@@ -18,12 +18,12 @@
import android.content.Context;
import android.hardware.radio.V1_0.CdmaSmsMessage;
+import android.telephony.Rlog;
import android.telephony.SmsCbCmasInfo;
import android.telephony.SmsCbMessage;
import android.telephony.cdma.CdmaSmsCbProgramData;
import android.testing.AndroidTestingRunner;
import android.testing.TestableLooper;
-import android.util.Log;
import com.android.cellbroadcastservice.BearerData;
import com.android.cellbroadcastservice.DefaultCellBroadcastService;
@@ -650,10 +650,10 @@
//SmsCbMessage cbMessage = msg.parseBroadcastSms("", 0);
// with random input, cbMessage will almost always be null (log when it isn't)
if (cbMessage != null) {
- Log.d(TAG, "success: " + cbMessage);
+ Rlog.d(TAG, "success: " + cbMessage);
}
} catch (Exception e) {
- Log.d(TAG, "exception thrown", e);
+ Rlog.d(TAG, "exception thrown", e);
fail("Exception in decoder at run " + run + " length " + len + ": " + e);
}
}
@@ -686,7 +686,7 @@
msg.getEnvelopeBearerData(), msg.getEnvelopeServiceCategory());
//SmsCbMessage cbMessage = msg.parseBroadcastSms("", 0);
} catch (Exception e) {
- Log.d(TAG, "exception thrown", e);
+ Rlog.d(TAG, "exception thrown", e);
fail("Exception in decoder at run " + run + " length " + len + ": " + e);
}
}
diff --git a/tests/src/com/android/cellbroadcastservice/tests/CellBroadcastProviderTest.java b/tests/src/com/android/cellbroadcastservice/tests/CellBroadcastProviderTest.java
index b5c3faf..b19d55f 100644
--- a/tests/src/com/android/cellbroadcastservice/tests/CellBroadcastProviderTest.java
+++ b/tests/src/com/android/cellbroadcastservice/tests/CellBroadcastProviderTest.java
@@ -27,9 +27,9 @@
import android.database.Cursor;
import android.net.Uri;
import android.provider.Telephony.CellBroadcasts;
+import android.telephony.Rlog;
import android.test.mock.MockContentResolver;
import android.test.mock.MockContext;
-import android.util.Log;
import com.android.cellbroadcastservice.CellBroadcastProvider;
import com.android.cellbroadcastservice.CellBroadcastProvider.PermissionChecker;
@@ -325,7 +325,7 @@
@Override
public Object getSystemService(String name) {
- Log.d(TAG, "getSystemService: returning null");
+ Rlog.d(TAG, "getSystemService: returning null");
return null;
}
diff --git a/tests/src/com/android/cellbroadcastservice/tests/CellBroadcastProviderTestable.java b/tests/src/com/android/cellbroadcastservice/tests/CellBroadcastProviderTestable.java
index b50ccb0..06fde6b 100644
--- a/tests/src/com/android/cellbroadcastservice/tests/CellBroadcastProviderTestable.java
+++ b/tests/src/com/android/cellbroadcastservice/tests/CellBroadcastProviderTestable.java
@@ -20,7 +20,7 @@
import android.content.pm.ProviderInfo;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
-import android.util.Log;
+import android.telephony.Rlog;
import androidx.test.InstrumentationRegistry;
@@ -36,7 +36,7 @@
@Override
public boolean onCreate() {
// DO NOT call super.onCreate(), otherwise the permission checker will be override.
- Log.d(TAG, "CellBroadcastProviderTestable onCreate");
+ Rlog.d(TAG, "CellBroadcastProviderTestable onCreate");
mDbHelper = new InMemoryCellBroadcastProviderDbHelper();
return true;
}
@@ -55,7 +55,7 @@
@Override
public void onCreate(SQLiteDatabase db) {
- Log.d(TAG, "IN MEMORY DB CREATED");
+ Rlog.d(TAG, "IN MEMORY DB CREATED");
db.execSQL(getStringForCellBroadcastTableCreation(CELL_BROADCASTS_TABLE_NAME));
}
diff --git a/tests/src/com/android/cellbroadcastservice/tests/GsmSmsCbMessageTest.java b/tests/src/com/android/cellbroadcastservice/tests/GsmSmsCbMessageTest.java
index 73820b6..1547a56 100644
--- a/tests/src/com/android/cellbroadcastservice/tests/GsmSmsCbMessageTest.java
+++ b/tests/src/com/android/cellbroadcastservice/tests/GsmSmsCbMessageTest.java
@@ -17,13 +17,13 @@
package com.android.cellbroadcastservice.tests;
import android.telephony.CbGeoUtils;
+import android.telephony.Rlog;
import android.telephony.SmsCbCmasInfo;
import android.telephony.SmsCbEtwsInfo;
import android.telephony.SmsCbLocation;
import android.telephony.SmsCbMessage;
import android.testing.AndroidTestingRunner;
import android.testing.TestableLooper;
-import android.util.Log;
import androidx.test.InstrumentationRegistry;
@@ -77,27 +77,27 @@
String message = GsmSmsCbMessage.getEtwsPrimaryMessage(mMockedContext,
SmsCbEtwsInfo.ETWS_WARNING_TYPE_EARTHQUAKE);
- Log.d("GsmSmsCbMessageTest", "earthquake message=" + message);
+ Rlog.d("GsmSmsCbMessageTest", "earthquake message=" + message);
assertEquals(testMessage1, message);
message = GsmSmsCbMessage.getEtwsPrimaryMessage(mMockedContext,
SmsCbEtwsInfo.ETWS_WARNING_TYPE_TSUNAMI);
- Log.d("GsmSmsCbMessageTest", "tsunami message=" + message);
+ Rlog.d("GsmSmsCbMessageTest", "tsunami message=" + message);
assertEquals(testMessage2, message);
message = GsmSmsCbMessage.getEtwsPrimaryMessage(mMockedContext,
SmsCbEtwsInfo.ETWS_WARNING_TYPE_EARTHQUAKE_AND_TSUNAMI);
- Log.d("GsmSmsCbMessageTest", "earthquake and tsunami message=" + message);
+ Rlog.d("GsmSmsCbMessageTest", "earthquake and tsunami message=" + message);
assertEquals(testMessage3, message);
message = GsmSmsCbMessage.getEtwsPrimaryMessage(mMockedContext,
SmsCbEtwsInfo.ETWS_WARNING_TYPE_TEST_MESSAGE);
- Log.d("GsmSmsCbMessageTest", "test message=" + message);
+ Rlog.d("GsmSmsCbMessageTest", "test message=" + message);
assertEquals(testMessage4, message);
message = GsmSmsCbMessage.getEtwsPrimaryMessage(mMockedContext,
SmsCbEtwsInfo.ETWS_WARNING_TYPE_OTHER_EMERGENCY);
- Log.d("GsmSmsCbMessageTest", "others message=" + message);
+ Rlog.d("GsmSmsCbMessageTest", "others message=" + message);
assertEquals(testMessage5, message);
}
@@ -126,7 +126,7 @@
SmsCbMessage msg = GsmSmsCbMessage.createSmsCbMessage(mMockedContext, header, null, pdus,
0);
- Log.d(TAG, "msg=" + msg);
+ Rlog.d(TAG, "msg=" + msg);
assertEquals(SmsCbMessage.GEOGRAPHICAL_SCOPE_CELL_WIDE_IMMEDIATE,
msg.getGeographicalScope());
@@ -171,7 +171,7 @@
GsmSmsCbMessage.GeoFencingTriggerMessage triggerMessage =
GsmSmsCbMessage.createGeoFencingTriggerMessage(pdu);
- Log.d(TAG, "trigger message=" + triggerMessage);
+ Rlog.d(TAG, "trigger message=" + triggerMessage);
assertEquals(1, triggerMessage.type);
assertEquals(1, triggerMessage.cbIdentifiers.size());
@@ -1013,7 +1013,7 @@
@Test
public void testEtwsMessageNormal() {
SmsCbMessage msg = createFromPdu(etwsMessageNormal);
- Log.d(TAG, msg.toString());
+ Rlog.d(TAG, msg.toString());
assertEquals("GS mismatch", 0, msg.getGeographicalScope());
assertEquals("serial number mismatch", 0, msg.getSerialNumber());
assertEquals("message ID mismatch", 0x1100, msg.getServiceCategory());
@@ -1024,7 +1024,7 @@
@Test
public void testEtwsMessageCancel() {
SmsCbMessage msg = createFromPdu(etwsMessageCancel);
- Log.d(TAG, msg.toString());
+ Rlog.d(TAG, msg.toString());
assertEquals("GS mismatch", 0, msg.getGeographicalScope());
assertEquals("serial number mismatch", 0, msg.getSerialNumber());
assertEquals("message ID mismatch", 0x1100, msg.getServiceCategory());
@@ -1035,7 +1035,7 @@
@Test
public void testEtwsMessageTest() {
SmsCbMessage msg = createFromPdu(etwsMessageTest);
- Log.d(TAG, msg.toString());
+ Rlog.d(TAG, msg.toString());
assertEquals("GS mismatch", 0, msg.getGeographicalScope());
assertEquals("serial number mismatch", 0, msg.getSerialNumber());
assertEquals("message ID mismatch", 0x1103, msg.getServiceCategory());
@@ -1057,7 +1057,7 @@
// this should return a SmsCbMessage object or null for invalid data
SmsCbMessage msg = createFromPdu(data);
} catch (Exception e) {
- Log.d(TAG, "exception thrown", e);
+ Rlog.d(TAG, "exception thrown", e);
fail("Exception in decoder at run " + run + " length " + len + ": " + e);
}
}