diff options
author | Sungsoo Lim <sungsoo@google.com> | 2014-05-15 13:40:29 +0900 |
---|---|---|
committer | Sungsoo Lim <sungsoo@google.com> | 2014-05-15 14:35:13 +0900 |
commit | c5822c429140d918688dcce2867b8e652a9ca49b (patch) | |
tree | d996b49b8f67ca07c600413f81f3ff7b0eec4e22 /src/com/android/tv | |
parent | 10e4bd79f61c624b451a4f01fc1a9ea7c16168db (diff) | |
download | TV-c5822c429140d918688dcce2867b8e652a9ca49b.tar.gz |
Clean up debug log messages of TvActivity.
Change-Id: Ia011a58e293d607e03a318f50e008f73153c84a3
Diffstat (limited to 'src/com/android/tv')
-rw-r--r-- | src/com/android/tv/TvActivity.java | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/com/android/tv/TvActivity.java b/src/com/android/tv/TvActivity.java index 23ed9e2e..1f9b1972 100644 --- a/src/com/android/tv/TvActivity.java +++ b/src/com/android/tv/TvActivity.java @@ -240,7 +240,7 @@ public class TvActivity extends Activity implements @Override public boolean onDown(MotionEvent event) { - Log.d(TAG, "onDown: " + event.toString()); + if (DEBUG) Log.d(TAG, "onDown: " + event.toString()); if (mChannelMap == null) { return false; } @@ -353,9 +353,7 @@ public class TvActivity extends Activity implements showInputPickerDialog(); return; } - if (DEBUG) { - Log.d(TAG, "Retry start session (retryCount=" + retryCount + ")"); - } + if (DEBUG) Log.d(TAG, "Retry start session (retryCount=" + retryCount + ")"); mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_START_DEFAULT_SESSION_RETRY, retryCount + 1, 0, new Object[]{input, channelId}), START_DEFAULT_SESSION_RETRY_INTERVAL); @@ -591,10 +589,10 @@ public class TvActivity extends Activity implements private void startPipSession() { if (mTvSession == null) { - Log.w(TAG, "TV content should be playing."); + Log.w(TAG, "TV content should be playing"); return; } - Log.d(TAG, "startPipSession"); + if (DEBUG) Log.d(TAG, "startPipSession()"); mPipInputInfo = mTvInputInfo; mPipView.bindTvInput(mPipInputInfo.getId(), mPipSessionCreated); mPipShowing = true; @@ -604,9 +602,9 @@ public class TvActivity extends Activity implements new TvInputManager.SessionCallback() { @Override public void onSessionCreated(final TvInputManager.Session session) { - Log.d(TAG, "PIP session is created."); + if (DEBUG) Log.d(TAG, "PIP session is created"); if (mTvSession == null) { - Log.w(TAG, "TV content should be playing."); + Log.w(TAG, "TV content should be playing"); if (session != null) { mPipView.unbindTvInput(); } @@ -614,7 +612,7 @@ public class TvActivity extends Activity implements return; } if (session == null) { - Log.w(TAG, "Fail to create another session."); + Log.w(TAG, "Fail to create another session"); mPipShowing = false; return; } @@ -647,10 +645,10 @@ public class TvActivity extends Activity implements }; private void tune() { - Log.d(TAG, "tune()"); + if (DEBUG) Log.d(TAG, "tune()"); // Prerequisites to be able to tune. if (mChannelMap == null || !mChannelMap.isLoadFinished()) { - Log.d(TAG, "Channel map not ready"); + if (DEBUG) Log.d(TAG, "Channel map not ready"); mTunePendding = true; return; } @@ -663,13 +661,13 @@ public class TvActivity extends Activity implements } String inputId = Utils.getInputIdForChannel(this, currentChannelUri); if (!mTvInputInfo.getId().equals(inputId)) { - Log.d(TAG, "TV input is changed"); + if (DEBUG) Log.d(TAG, "TV input is changed"); changeSession(mTvInputManagerHelper.getTvInputInfo(inputId)); mTunePendding = true; return; } if (mTvSession == null) { - Log.d(TAG, "Service not connected"); + if (DEBUG) Log.d(TAG, "Session is not created yet"); mTunePendding = true; return; } @@ -781,7 +779,7 @@ public class TvActivity extends Activity implements } private void stopPipSession() { - Log.d(TAG, "stopPipSession"); + if (DEBUG) Log.d(TAG, "stopPipSession"); if (mPipSession != null) { mPipView.setVisibility(View.INVISIBLE); mPipView.unbindTvInput(); @@ -805,7 +803,7 @@ public class TvActivity extends Activity implements mPipView.getHolder().removeCallback(mSurfaceHolderCallback); PreferenceManager.getDefaultSharedPreferences(this).edit() .putBoolean(PREF_KEY_IS_UNIFIED_TV_INPUT, mIsUnifiedTvInput).apply(); - Log.d(TAG, "onDestroy()"); + if (DEBUG) Log.d(TAG, "onDestroy()"); super.onDestroy(); } |