Log visibility change for DialogCreatable in Settings.
Bug: 30681529 Test: adb logcat -b events | egrep "(sysui_|notification_)" Test: make RunSettingsRoboTests Change-Id: I51754d258ba1ddfae24323681f21cd02de4dbb4e
This commit is contained in:
@@ -26,6 +26,7 @@ import android.os.UserManager;
|
||||
import android.support.v14.preference.SwitchPreference;
|
||||
import android.support.v7.preference.Preference;
|
||||
|
||||
import com.android.internal.logging.MetricsProto;
|
||||
import com.android.internal.logging.MetricsProto.MetricsEvent;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
@@ -192,6 +193,20 @@ public class UserDetailsSettings extends SettingsPreferenceFragment
|
||||
throw new IllegalArgumentException("Unsupported dialogId " + dialogId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDialogMetricsCategory(int dialogId) {
|
||||
switch (dialogId) {
|
||||
case DIALOG_CONFIRM_REMOVE:
|
||||
return MetricsProto.MetricsEvent.DIALOG_USER_REMOVE;
|
||||
case DIALOG_CONFIRM_ENABLE_CALLING:
|
||||
return MetricsProto.MetricsEvent.DIALOG_USER_ENABLE_CALLING;
|
||||
case DIALOG_CONFIRM_ENABLE_CALLING_AND_SMS:
|
||||
return MetricsProto.MetricsEvent.DIALOG_USER_ENABLE_CALLING_AND_SMS;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void removeUser() {
|
||||
mUserManager.removeUser(mUserInfo.id);
|
||||
finishFragment();
|
||||
|
Reference in New Issue
Block a user