Settings UI for SIM access profile (1/2)
Change-Id: Iff14295ac0eb65561a2097f25c70e8b5f8be5003
This commit is contained in:
committed by
Andre Eisenbach
parent
3342d762e9
commit
faadcd60e7
14
src/com/android/settings/bluetooth/BluetoothPermissionActivity.java
Executable file → Normal file
14
src/com/android/settings/bluetooth/BluetoothPermissionActivity.java
Executable file → Normal file
@@ -101,6 +101,8 @@ public class BluetoothPermissionActivity extends AlertActivity implements
|
||||
showDialog(getString(R.string.bluetooth_phonebook_request), mRequestType);
|
||||
} else if (mRequestType == BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS) {
|
||||
showDialog(getString(R.string.bluetooth_map_request), mRequestType);
|
||||
} else if (mRequestType == BluetoothDevice.REQUEST_TYPE_SIM_ACCESS) {
|
||||
showDialog(getString(R.string.bluetooth_sap_request), mRequestType);
|
||||
}
|
||||
else {
|
||||
Log.e(TAG, "Error: bad request type: " + mRequestType);
|
||||
@@ -129,6 +131,9 @@ public class BluetoothPermissionActivity extends AlertActivity implements
|
||||
case BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS:
|
||||
p.mView = createMapDialogView();
|
||||
break;
|
||||
case BluetoothDevice.REQUEST_TYPE_SIM_ACCESS:
|
||||
p.mView = createSapDialogView();
|
||||
break;
|
||||
}
|
||||
p.mPositiveButtonText = getString(R.string.yes);
|
||||
p.mPositiveButtonListener = this;
|
||||
@@ -183,6 +188,15 @@ public class BluetoothPermissionActivity extends AlertActivity implements
|
||||
return mView;
|
||||
}
|
||||
|
||||
private View createSapDialogView() {
|
||||
String mRemoteName = createRemoteName();
|
||||
mView = getLayoutInflater().inflate(R.layout.bluetooth_access, null);
|
||||
messageView = (TextView)mView.findViewById(R.id.message);
|
||||
messageView.setText(getString(R.string.bluetooth_sap_acceptance_dialog_text,
|
||||
mRemoteName, mRemoteName));
|
||||
return mView;
|
||||
}
|
||||
|
||||
private void onPositive() {
|
||||
if (DEBUG) Log.d(TAG, "onPositive");
|
||||
sendReplyIntentToReceiver(true, true);
|
||||
|
||||
Reference in New Issue
Block a user