summaryrefslogtreecommitdiffstats
path: root/pxp-monitor
diff options
context:
space:
mode:
Diffstat (limited to 'pxp-monitor')
-rw-r--r--pxp-monitor/AndroidManifest.xml2
-rw-r--r--pxp-monitor/src/org/codeaurora/bluetooth/pxpmonitor/PathLossFragment.java102
2 files changed, 49 insertions, 55 deletions
diff --git a/pxp-monitor/AndroidManifest.xml b/pxp-monitor/AndroidManifest.xml
index c984c0a..244abe6 100644
--- a/pxp-monitor/AndroidManifest.xml
+++ b/pxp-monitor/AndroidManifest.xml
@@ -60,7 +60,7 @@
</activity>
<activity android:name=".DeviceActivity" />
<activity android:name=".ScanDevicesActivity" />
- <activity android:name=".PariedDevicesActivity" />
+ <activity android:name=".PairedDevicesActivity" />
<activity android:name=".ConnectedDevicesActivity" />
<activity android:name=".AlertsHistory" />
diff --git a/pxp-monitor/src/org/codeaurora/bluetooth/pxpmonitor/PathLossFragment.java b/pxp-monitor/src/org/codeaurora/bluetooth/pxpmonitor/PathLossFragment.java
index dc2f7ba..aaafd5f 100644
--- a/pxp-monitor/src/org/codeaurora/bluetooth/pxpmonitor/PathLossFragment.java
+++ b/pxp-monitor/src/org/codeaurora/bluetooth/pxpmonitor/PathLossFragment.java
@@ -86,44 +86,41 @@ public class PathLossFragment extends Fragment implements View.OnClickListener {
CharSequence text = null;
- if (actionId == EditorInfo.IME_ACTION_DONE) {
- int threshold = Integer.parseInt(mMinValue.getText().toString());
+ int threshold = Integer.parseInt(mMinValue.getText().toString());
- if (threshold > THRESHOLD_MAX) {
+ if (threshold > THRESHOLD_MAX) {
- text = "Threshold is to big. Changing to "
- + Integer.toString(THRESHOLD_MAX);
+ text = "Threshold is too big. Changing to "
+ + Integer.toString(THRESHOLD_MAX);
- threshold = THRESHOLD_MAX;
- mMinValue.setText(String.valueOf(threshold));
+ threshold = THRESHOLD_MAX;
+ mMinValue.setText(String.valueOf(threshold));
- } else if (threshold < THRESHOLD_MIN) {
+ } else if (threshold < THRESHOLD_MIN) {
- text = "Threshold is to small. Changing to "
- + Integer.toString(THRESHOLD_MIN);
+ text = "Threshold is too small. Changing to "
+ + Integer.toString(THRESHOLD_MIN);
- threshold = THRESHOLD_MIN;
- mMinValue.setText(String.valueOf(threshold));
- }
+ threshold = THRESHOLD_MIN;
+ mMinValue.setText(String.valueOf(threshold));
+ }
- if (text != null) {
- Context context = getActivity();
+ if (text != null) {
+ Context context = getActivity();
- Toast toast = Toast.makeText(context, text, Toast.LENGTH_SHORT);
- toast.setGravity(Gravity.CENTER, 0, 0);
- toast.show();
- }
+ Toast toast = Toast.makeText(context, text, Toast.LENGTH_SHORT);
+ toast.setGravity(Gravity.CENTER, 0, 0);
+ toast.show();
+ }
- mActivity.mPxpServiceProxy.setMinPathLossThreshold(mActivity.mLeDevice,
- threshold);
+ mActivity.mPxpServiceProxy.setMinPathLossThreshold(mActivity.mLeDevice,
+ threshold);
- final InputMethodManager imm = (InputMethodManager) getActivity()
- .getSystemService(Context.INPUT_METHOD_SERVICE);
- imm.hideSoftInputFromWindow(getView().getWindowToken(), 0);
+ final InputMethodManager imm = (InputMethodManager) getActivity()
+ .getSystemService(Context.INPUT_METHOD_SERVICE);
+ imm.hideSoftInputFromWindow(getView().getWindowToken(), 0);
- return true;
- }
- return false;
+ return true;
}
});
@@ -133,44 +130,41 @@ public class PathLossFragment extends Fragment implements View.OnClickListener {
CharSequence text = null;
- if (actionId == EditorInfo.IME_ACTION_DONE) {
- int threshold = Integer.parseInt(mMaxValue.getText().toString());
+ int threshold = Integer.parseInt(mMaxValue.getText().toString());
- if (threshold > THRESHOLD_MAX) {
+ if (threshold > THRESHOLD_MAX) {
- text = "Threshold is to big. Changing to "
- + Integer.toString(THRESHOLD_MAX);
+ text = "Threshold is too big. Changing to "
+ + Integer.toString(THRESHOLD_MAX);
- threshold = THRESHOLD_MAX;
- mMaxValue.setText(String.valueOf(threshold));
+ threshold = THRESHOLD_MAX;
+ mMaxValue.setText(String.valueOf(threshold));
- } else if (threshold < THRESHOLD_MIN) {
+ } else if (threshold < THRESHOLD_MIN) {
- text = "Threshold is to small. Changing to "
- + Integer.toString(THRESHOLD_MIN);
+ text = "Threshold is too small. Changing to "
+ + Integer.toString(THRESHOLD_MIN);
- threshold = THRESHOLD_MIN;
- mMaxValue.setText(String.valueOf(threshold));
- }
+ threshold = THRESHOLD_MIN;
+ mMaxValue.setText(String.valueOf(threshold));
+ }
- if (text != null) {
- Context context = getActivity();
+ if (text != null) {
+ Context context = getActivity();
- Toast toast = Toast.makeText(context, text, Toast.LENGTH_SHORT);
- toast.setGravity(Gravity.CENTER, 0, 0);
- toast.show();
- }
+ Toast toast = Toast.makeText(context, text, Toast.LENGTH_SHORT);
+ toast.setGravity(Gravity.CENTER, 0, 0);
+ toast.show();
+ }
- mActivity.mPxpServiceProxy.setMaxPathLossThreshold(mActivity.mLeDevice,
- threshold);
+ mActivity.mPxpServiceProxy.setMaxPathLossThreshold(mActivity.mLeDevice,
+ threshold);
- final InputMethodManager imm = (InputMethodManager) getActivity()
- .getSystemService(Context.INPUT_METHOD_SERVICE);
- imm.hideSoftInputFromWindow(getView().getWindowToken(), 0);
+ final InputMethodManager imm = (InputMethodManager) getActivity()
+ .getSystemService(Context.INPUT_METHOD_SERVICE);
+ imm.hideSoftInputFromWindow(getView().getWindowToken(), 0);
- return true;
- }
- return false;
+ return true;
}
});