Skip to content

Commit 13d3347

Browse files
Romain GuyAndroid Code Review
authored andcommitted
Merge "replaced deprecated setButton Methods"
2 parents 798e2d3 + 7664e20 commit 13d3347

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

services/java/com/android/server/am/ActivityManagerService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
import android.content.ComponentName;
5353
import android.content.ContentResolver;
5454
import android.content.Context;
55+
import android.content.DialogInterface;
5556
import android.content.Intent;
5657
import android.content.IntentFilter;
5758
import android.content.IIntentReceiver;
@@ -1176,7 +1177,7 @@ public void handleMessage(Message msg) {
11761177
d.setCancelable(false);
11771178
d.setTitle("System UIDs Inconsistent");
11781179
d.setMessage("UIDs on the system are inconsistent, you need to wipe your data partition or your device will be unstable.");
1179-
d.setButton("I'm Feeling Lucky",
1180+
d.setButton(DialogInterface.BUTTON_POSITIVE, "I'm Feeling Lucky",
11801181
mHandler.obtainMessage(IM_FEELING_LUCKY_MSG));
11811182
mUidAlert = d;
11821183
d.show();

services/java/com/android/server/am/AppWaitingForDebuggerDialog.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.android.server.am;
1818

1919
import android.content.Context;
20+
import android.content.DialogInterface;
2021
import android.os.Handler;
2122
import android.os.Message;
2223

@@ -49,7 +50,7 @@ public AppWaitingForDebuggerDialog(ActivityManagerService service,
4950
text.append(" is waiting for the debugger to attach.");
5051

5152
setMessage(text.toString());
52-
setButton("Force Close", mHandler.obtainMessage(1, app));
53+
setButton(DialogInterface.BUTTON_POSITIVE, "Force Close", mHandler.obtainMessage(1, app));
5354
setTitle("Waiting For Debugger");
5455
getWindow().setTitle("Waiting For Debugger: " + app.info.processName);
5556
}

services/java/com/android/server/am/FactoryErrorDialog.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.android.server.am;
1818

1919
import android.content.Context;
20+
import android.content.DialogInterface;
2021
import android.os.Handler;
2122
import android.os.Message;
2223

@@ -26,7 +27,8 @@ public FactoryErrorDialog(Context context, CharSequence msg) {
2627
setCancelable(false);
2728
setTitle(context.getText(com.android.internal.R.string.factorytest_failed));
2829
setMessage(msg);
29-
setButton(context.getText(com.android.internal.R.string.factorytest_reboot),
30+
setButton(DialogInterface.BUTTON_POSITIVE,
31+
context.getText(com.android.internal.R.string.factorytest_reboot),
3032
mHandler.obtainMessage(0));
3133
getWindow().setTitle("Factory Error");
3234
}

0 commit comments

Comments
 (0)