Depend on support lib preferences
Bug: 24576551 Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
This commit is contained in:
@@ -19,41 +19,23 @@ package com.android.settings;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.os.SystemProperties;
|
||||
import android.preference.DialogPreference;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
public class BugreportPreference extends DialogPreference {
|
||||
public class BugreportPreference extends CustomDialogPreference {
|
||||
public BugreportPreference(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPrepareDialogBuilder(Builder builder) {
|
||||
super.onPrepareDialogBuilder(builder);
|
||||
builder.setPositiveButton(com.android.internal.R.string.report, this);
|
||||
protected void onPrepareDialogBuilder(Builder builder, DialogInterface.OnClickListener listener) {
|
||||
super.onPrepareDialogBuilder(builder, listener);
|
||||
builder.setPositiveButton(com.android.internal.R.string.report, listener);
|
||||
builder.setMessage(com.android.internal.R.string.bugreport_message);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void showDialog(Bundle state) {
|
||||
super.showDialog(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onBindDialogView(View view) {
|
||||
super.onBindDialogView(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDialogClosed(boolean positiveResult) {
|
||||
super.onDialogClosed(positiveResult);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
protected void onClick(DialogInterface dialog, int which) {
|
||||
if (which == DialogInterface.BUTTON_POSITIVE) {
|
||||
SystemProperties.set("ctl.start", "bugreport");
|
||||
}
|
||||
|
Reference in New Issue
Block a user