From 350d10f89fab998638ef74d9257c20a17c667ba5 Mon Sep 17 00:00:00 2001 From: Venkateshwarlu Domakonda Date: Wed, 15 Oct 2014 15:58:00 +0530 Subject: FM: Add support to get/set AF rssi sample count for Silabs FM. Add support to get/set AF rssi sample count from RF Stats application for Silabs FM solution. CRs-Fixed: 732776 Change-Id: I43498166afcc84f7f63f2d08b79f25bb86c25dfc --- fmapp2/res/values/arrays.xml | 2 ++ fmapp2/src/com/caf/fmradio/FMStats.java | 50 +++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/fmapp2/res/values/arrays.xml b/fmapp2/res/values/arrays.xml index a1216f4..c505ec0 100644 --- a/fmapp2/res/values/arrays.xml +++ b/fmapp2/res/values/arrays.xml @@ -375,6 +375,8 @@ Get AFJumpRssi Threshold Set RDS FIFO count Get RDS FIFO count + Set AfJmpRssi Samples count + Get AfJmpRssi Samples count RF Statistics diff --git a/fmapp2/src/com/caf/fmradio/FMStats.java b/fmapp2/src/com/caf/fmradio/FMStats.java index 6347096..1c20c7a 100644 --- a/fmapp2/src/com/caf/fmradio/FMStats.java +++ b/fmapp2/src/com/caf/fmradio/FMStats.java @@ -1776,6 +1776,56 @@ public class FMStats extends Activity { } break; case 8: + if (txtbox1 != null) { + txtbox1.setText(R.string.type_rd); + txtbox1.setVisibility(View.VISIBLE); + } + if (tv1 != null) { + tv1.setText(R.string.enter_AfJmpRmssiSmplsCnt); + tv1.setVisibility(View.VISIBLE); + } + if(button1 != null) { + button1.setVisibility(View.INVISIBLE); + } + if(button2 != null) { + button2.setVisibility(View.INVISIBLE); + } + if (SetButton != null) { + SetButton.setText(R.string.set_AfJmpRmssiSmplsCnt); + SetButton.setVisibility(View.VISIBLE); + SetButton.setOnClickListener(mOnSetAfJmpRmssiSmplsCntListener); + } + break; + case 9: + if (txtbox1 != null) { + txtbox1.setVisibility(View.INVISIBLE); + } + if (tv1 != null) { + tv1.setText(""); + tv1.setVisibility(View.VISIBLE); + } + if(button1 != null) { + button1.setVisibility(View.INVISIBLE); + } + if(button2 != null) { + button2.setVisibility(View.INVISIBLE); + } + if (SetButton != null) { + SetButton.setVisibility(View.INVISIBLE); + } + try { + if (mService != null) { + ret = mService.getAfJmpRmssiSamplesCnt(); + Log.d(LOGTAG, "Get AfJmpRmssiSamples count: " + ret); + if ((ret >= MIN_AF_JMP_RMSSI_SAMPLES) && + (ret <= MAX_AF_JMP_RMSSI_SAMPLES)) + tv1.setText(" " + String.valueOf(ret)); + } + } catch (RemoteException e) { + + } + break; + case 10: tLayout.removeAllViewsInLayout(); mNewRowIds = NEW_ROW_ID; tLayout.setVisibility(View.VISIBLE); -- cgit v1.2.3