Merge "Replace Rlog with Log in CarrierDefaultApp"
This commit is contained in:
@@ -35,7 +35,6 @@ import android.net.Uri;
|
|||||||
import android.net.http.SslError;
|
import android.net.http.SslError;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.telephony.CarrierConfigManager;
|
import android.telephony.CarrierConfigManager;
|
||||||
import android.telephony.Rlog;
|
|
||||||
import android.telephony.SubscriptionManager;
|
import android.telephony.SubscriptionManager;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.ArrayMap;
|
import android.util.ArrayMap;
|
||||||
@@ -477,11 +476,11 @@ public class CaptivePortalLoginActivity extends Activity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void logd(String s) {
|
private static void logd(String s) {
|
||||||
Rlog.d(TAG, s);
|
Log.d(TAG, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void loge(String s) {
|
private static void loge(String s) {
|
||||||
Rlog.d(TAG, s);
|
Log.d(TAG, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.PersistableBundle;
|
import android.os.PersistableBundle;
|
||||||
import android.telephony.CarrierConfigManager;
|
import android.telephony.CarrierConfigManager;
|
||||||
import android.telephony.Rlog;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
@@ -27,7 +26,6 @@ import com.android.internal.telephony.TelephonyIntents;
|
|||||||
import com.android.internal.util.ArrayUtils;
|
import com.android.internal.util.ArrayUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,7 +42,7 @@ public class CustomConfigLoader {
|
|||||||
private static final String INTER_GROUP_DELIMITER = "\\s*:\\s*";
|
private static final String INTER_GROUP_DELIMITER = "\\s*:\\s*";
|
||||||
|
|
||||||
private static final String TAG = CustomConfigLoader.class.getSimpleName();
|
private static final String TAG = CustomConfigLoader.class.getSimpleName();
|
||||||
private static final boolean VDBG = Rlog.isLoggable(TAG, Log.VERBOSE);
|
private static final boolean VDBG = Log.isLoggable(TAG, Log.VERBOSE);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* loads and parses the carrier config, return a list of carrier action for the given signal
|
* loads and parses the carrier config, return a list of carrier action for the given signal
|
||||||
@@ -70,7 +68,7 @@ public class CustomConfigLoader {
|
|||||||
// return an empty list if no match found
|
// return an empty list if no match found
|
||||||
List<Integer> actionList = new ArrayList<>();
|
List<Integer> actionList = new ArrayList<>();
|
||||||
if (carrierConfigManager == null) {
|
if (carrierConfigManager == null) {
|
||||||
Rlog.e(TAG, "load carrier config failure with carrier config manager uninitialized");
|
Log.e(TAG, "load carrier config failure with carrier config manager uninitialized");
|
||||||
return actionList;
|
return actionList;
|
||||||
}
|
}
|
||||||
PersistableBundle b = carrierConfigManager.getConfig();
|
PersistableBundle b = carrierConfigManager.getConfig();
|
||||||
@@ -101,8 +99,8 @@ public class CustomConfigLoader {
|
|||||||
.EXTRA_DEFAULT_NETWORK_AVAILABLE_KEY, false));
|
.EXTRA_DEFAULT_NETWORK_AVAILABLE_KEY, false));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Rlog.e(TAG, "load carrier config failure with un-configured key: " +
|
Log.e(TAG, "load carrier config failure with un-configured key: "
|
||||||
intent.getAction());
|
+ intent.getAction());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!ArrayUtils.isEmpty(configs)) {
|
if (!ArrayUtils.isEmpty(configs)) {
|
||||||
@@ -111,12 +109,12 @@ public class CustomConfigLoader {
|
|||||||
matchConfig(config, arg1, arg2, actionList);
|
matchConfig(config, arg1, arg2, actionList);
|
||||||
if (!actionList.isEmpty()) {
|
if (!actionList.isEmpty()) {
|
||||||
// return the first match
|
// return the first match
|
||||||
if (VDBG) Rlog.d(TAG, "found match action list: " + actionList.toString());
|
if (VDBG) Log.d(TAG, "found match action list: " + actionList.toString());
|
||||||
return actionList;
|
return actionList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rlog.d(TAG, "no matching entry for signal: " + intent.getAction() + "arg1: " + arg1
|
Log.d(TAG, "no matching entry for signal: " + intent.getAction() + "arg1: " + arg1
|
||||||
+ "arg2: " + arg2);
|
+ "arg2: " + arg2);
|
||||||
}
|
}
|
||||||
return actionList;
|
return actionList;
|
||||||
@@ -166,7 +164,7 @@ public class CustomConfigLoader {
|
|||||||
try {
|
try {
|
||||||
actionList.add(Integer.parseInt(idx));
|
actionList.add(Integer.parseInt(idx));
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
Rlog.e(TAG, "NumberFormatException(string: " + idx + " config:" + config + "): "
|
Log.e(TAG, "NumberFormatException(string: " + idx + " config:" + config + "): "
|
||||||
+ e);
|
+ e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user