Merge "API Review PhoneManager -> TelecommManager. Rename methods (3/6)" into lmp-dev
This commit is contained in:
@@ -37,9 +37,8 @@ import android.os.SystemProperties;
|
|||||||
import android.os.UserHandle;
|
import android.os.UserHandle;
|
||||||
import android.os.storage.IMountService;
|
import android.os.storage.IMountService;
|
||||||
import android.os.storage.StorageManager;
|
import android.os.storage.StorageManager;
|
||||||
|
|
||||||
import android.phone.PhoneManager;
|
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
|
import android.telecomm.TelecommManager;
|
||||||
import android.telephony.TelephonyManager;
|
import android.telephony.TelephonyManager;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
@@ -888,7 +887,7 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
|
|||||||
}
|
}
|
||||||
|
|
||||||
int textId;
|
int textId;
|
||||||
if (getPhoneManager().isInAPhoneCall()) {
|
if (getTelecommManager().isInCall()) {
|
||||||
// Show "return to call"
|
// Show "return to call"
|
||||||
textId = R.string.cryptkeeper_return_to_call;
|
textId = R.string.cryptkeeper_return_to_call;
|
||||||
} else {
|
} else {
|
||||||
@@ -902,9 +901,9 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void takeEmergencyCallAction() {
|
private void takeEmergencyCallAction() {
|
||||||
PhoneManager phoneManager = getPhoneManager();
|
TelecommManager telecommManager = getTelecommManager();
|
||||||
if (phoneManager.isInAPhoneCall()) {
|
if (telecommManager.isInCall()) {
|
||||||
phoneManager.showCallScreen(false /* showDialpad */);
|
telecommManager.showInCallScreen(false /* showDialpad */);
|
||||||
} else {
|
} else {
|
||||||
launchEmergencyDialer();
|
launchEmergencyDialer();
|
||||||
}
|
}
|
||||||
@@ -923,8 +922,8 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
|
|||||||
return (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
|
return (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private PhoneManager getPhoneManager() {
|
private TelecommManager getTelecommManager() {
|
||||||
return (PhoneManager) getSystemService(Context.PHONE_SERVICE);
|
return (TelecommManager) getSystemService(Context.TELECOMM_SERVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user