Skip to content

Commit 2b9a49a

Browse files
Romain GuyAndroid Code Review
authored andcommitted
Merge "Removed Calls to deprecated APIs"
2 parents 38581c9 + 746a95a commit 2b9a49a

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

cmds/am/src/com/android/commands/am/Am.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ private Intent makeIntent() throws URISyntaxException {
160160
String uri = nextArg();
161161
if (uri != null) {
162162
Intent oldIntent = intent;
163-
intent = Intent.getIntent(uri);
163+
intent = Intent.parseUri(uri, 0);
164164
if (oldIntent.getAction() != null) {
165165
intent.setAction(oldIntent.getAction());
166166
}

core/java/android/preference/DialogPreference.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import android.view.View;
3434
import android.view.Window;
3535
import android.view.WindowManager;
36-
import android.view.inputmethod.InputMethodManager;
3736
import android.widget.TextView;
3837

3938
/**
@@ -275,7 +274,7 @@ protected void onClick() {
275274
protected void showDialog(Bundle state) {
276275
Context context = getContext();
277276

278-
mWhichButtonClicked = DialogInterface.BUTTON2;
277+
mWhichButtonClicked = DialogInterface.BUTTON_NEGATIVE;
279278

280279
mBuilder = new AlertDialog.Builder(context)
281280
.setTitle(mDialogTitle)

core/java/android/widget/Gallery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,7 @@ private boolean dispatchLongPress(View view, int position, long id) {
10871087
@Override
10881088
public boolean dispatchKeyEvent(KeyEvent event) {
10891089
// Gallery steals all key events
1090-
return event.dispatch(this);
1090+
return event.dispatch(this, null, null);
10911091
}
10921092

10931093
/**

core/java/com/android/internal/app/NetInitiatedActivity.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,9 @@
2323
import android.content.Intent;
2424
import android.content.IntentFilter;
2525
import android.os.Bundle;
26-
import android.os.Handler;
27-
import android.os.IMountService;
28-
import android.os.Message;
29-
import android.os.RemoteException;
30-
import android.os.ServiceManager;
3126
import android.widget.Toast;
3227
import android.util.Log;
3328
import android.location.LocationManager;
34-
import com.android.internal.location.GpsLocationProvider;
3529
import com.android.internal.location.GpsNetInitiatedHandler;
3630

3731
/**
@@ -45,8 +39,8 @@ public class NetInitiatedActivity extends AlertActivity implements DialogInterfa
4539
private static final boolean DEBUG = true;
4640
private static final boolean VERBOSE = false;
4741

48-
private static final int POSITIVE_BUTTON = AlertDialog.BUTTON1;
49-
private static final int NEGATIVE_BUTTON = AlertDialog.BUTTON2;
42+
private static final int POSITIVE_BUTTON = AlertDialog.BUTTON_POSITIVE;
43+
private static final int NEGATIVE_BUTTON = AlertDialog.BUTTON_NEGATIVE;
5044

5145
// Dialog button text
5246
public static final String BUTTON_TEXT_ACCEPT = "Accept";

0 commit comments

Comments
 (0)