Merge "Fix crash in getMetricsTag"
This commit is contained in:
committed by
Android (Google) Code Review
commit
9fd2b11555
@@ -205,10 +205,14 @@ public class SettingsActivity extends SettingsBaseActivity
|
||||
}
|
||||
|
||||
private String getMetricsTag() {
|
||||
String tag = getClass().getName();
|
||||
String tag = null;
|
||||
if (getIntent() != null && getIntent().hasExtra(EXTRA_SHOW_FRAGMENT)) {
|
||||
tag = getIntent().getStringExtra(EXTRA_SHOW_FRAGMENT);
|
||||
}
|
||||
if (TextUtils.isEmpty(tag)) {
|
||||
Log.w(LOG_TAG, "MetricsTag is invalid " + tag);
|
||||
tag = getClass().getName();
|
||||
}
|
||||
if (tag.startsWith("com.android.settings.")) {
|
||||
tag = tag.replace("com.android.settings.", "");
|
||||
}
|
||||
|
Reference in New Issue
Block a user