aboutsummaryrefslogtreecommitdiff
path: root/src/com/android
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/tv/features/TvFeatures.java3
-rw-r--r--src/com/android/tv/ui/KeypadChannelSwitchView.java17
2 files changed, 17 insertions, 3 deletions
diff --git a/src/com/android/tv/features/TvFeatures.java b/src/com/android/tv/features/TvFeatures.java
index c4e388a3..75bfabe9 100644
--- a/src/com/android/tv/features/TvFeatures.java
+++ b/src/com/android/tv/features/TvFeatures.java
@@ -28,8 +28,7 @@ import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
-import androidx.core.R;
-
+import com.android.tv.R;
import com.android.tv.common.feature.CommonFeatures;
import com.android.tv.common.feature.Feature;
import com.android.tv.common.feature.FeatureUtils;
diff --git a/src/com/android/tv/ui/KeypadChannelSwitchView.java b/src/com/android/tv/ui/KeypadChannelSwitchView.java
index a26175a4..262c3506 100644
--- a/src/com/android/tv/ui/KeypadChannelSwitchView.java
+++ b/src/com/android/tv/ui/KeypadChannelSwitchView.java
@@ -35,6 +35,7 @@ import android.widget.BaseAdapter;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
+
import com.android.tv.MainActivity;
import com.android.tv.R;
import com.android.tv.TvSingletons;
@@ -43,6 +44,7 @@ import com.android.tv.common.SoftPreconditions;
import com.android.tv.common.util.DurationTimer;
import com.android.tv.data.ChannelNumber;
import com.android.tv.data.api.Channel;
+
import java.util.ArrayList;
import java.util.List;
@@ -50,7 +52,7 @@ public class KeypadChannelSwitchView extends LinearLayout
implements TvTransitionManager.TransitionLayout {
private static final String TAG = "KeypadChannelSwitchView";
- private static final int MAX_CHANNEL_NUMBER_DIGIT = 4;
+ private static final int MAX_CHANNEL_NUMBER_DIGIT = 5;
private static final int MAX_MINOR_CHANNEL_NUMBER_DIGIT = 3;
private static final int MAX_CHANNEL_ITEM = 8;
private static final String CHANNEL_DELIMITERS_REGEX = "[-\\.\\s]";
@@ -248,13 +250,26 @@ public class KeypadChannelSwitchView extends LinearLayout
public void onNumberKeyUp(int num) {
// Reset typed channel number in some cases.
if (mTypedChannelNumber.majorNumber == null) {
+ Log.i(TAG, "Channel number reset because majorNumber is null");
mTypedChannelNumber.reset();
} else if (!mTypedChannelNumber.hasDelimiter
&& mTypedChannelNumber.majorNumber.length() >= MAX_CHANNEL_NUMBER_DIGIT) {
+ Log.i(
+ TAG,
+ "Channel number reset because majorNumber.length = "
+ + mTypedChannelNumber.majorNumber.length()
+ + " >= MAX_CHANNEL_NUMBER_DIGIT = "
+ + MAX_CHANNEL_NUMBER_DIGIT);
mTypedChannelNumber.reset();
} else if (mTypedChannelNumber.hasDelimiter
&& mTypedChannelNumber.minorNumber != null
&& mTypedChannelNumber.minorNumber.length() >= MAX_MINOR_CHANNEL_NUMBER_DIGIT) {
+ Log.i(
+ TAG,
+ "Channel number reset because minorNumber.length = "
+ + mTypedChannelNumber.minorNumber.length()
+ + " >= MAX_MINOR_CHANNEL_NUMBER_DIGIT = "
+ + MAX_MINOR_CHANNEL_NUMBER_DIGIT);
mTypedChannelNumber.reset();
}