aboutsummaryrefslogtreecommitdiff
path: root/src/com
diff options
context:
space:
mode:
authorChristofer Ã…kersten <akersten@google.com>2020-07-30 06:40:54 -0700
committerChristofer Ã…kersten <akersten@google.com>2020-07-30 06:41:20 -0700
commit450c9d80fffa4ca3a4e34c6a1b731e2e7756743d (patch)
tree946d393a463c6a9c53ca8ba75d4b42b7196a4591 /src/com
parent4db5fd75dda5ee2b624de2bad482250c35de229d (diff)
downloadTV-450c9d80fffa4ca3a4e34c6a1b731e2e7756743d.tar.gz
Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference BUG=161896447 Test: Build Change-Id: I74157c724370aa33cb63b5b880aa98b7a95ffa75
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/tv/MainActivity.java38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/com/android/tv/MainActivity.java b/src/com/android/tv/MainActivity.java
index 5cfdd194..9c615b93 100644
--- a/src/com/android/tv/MainActivity.java
+++ b/src/com/android/tv/MainActivity.java
@@ -230,20 +230,20 @@ public class MainActivity extends Activity
private static final String SCREEN_BEHIND_NAME = "Behind";
private static final float REFRESH_RATE_EPSILON = 0.01f;
- private static final HashSet<Integer> BLACKLIST_KEYCODE_TO_TIS;
+ private static final HashSet<Integer> BLOCKLIST_KEYCODE_TO_TIS;
// These keys won't be passed to TIS in addition to gamepad buttons.
static {
- BLACKLIST_KEYCODE_TO_TIS = new HashSet<>();
- BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_TV_INPUT);
- BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_MENU);
- BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_CHANNEL_UP);
- BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_CHANNEL_DOWN);
- BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_VOLUME_UP);
- BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_VOLUME_DOWN);
- BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_VOLUME_MUTE);
- BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_MUTE);
- BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_SEARCH);
- BLACKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_WINDOW);
+ BLOCKLIST_KEYCODE_TO_TIS = new HashSet<>();
+ BLOCKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_TV_INPUT);
+ BLOCKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_MENU);
+ BLOCKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_CHANNEL_UP);
+ BLOCKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_CHANNEL_DOWN);
+ BLOCKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_VOLUME_UP);
+ BLOCKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_VOLUME_DOWN);
+ BLOCKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_VOLUME_MUTE);
+ BLOCKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_MUTE);
+ BLOCKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_SEARCH);
+ BLOCKLIST_KEYCODE_TO_TIS.add(KeyEvent.KEYCODE_WINDOW);
}
private static final IntentFilter SYSTEM_INTENT_FILTER = new IntentFilter();
@@ -330,7 +330,7 @@ public class MainActivity extends Activity
private boolean mActivityResumed;
private boolean mActivityStarted;
private boolean mShouldTuneToTunerChannel;
- private boolean mUseKeycodeBlacklist;
+ private boolean mUseKeycodeBlocklist;
private boolean mShowLockedChannelsTemporarily;
private boolean mBackKeyPressed;
private boolean mNeedShowBackKeyGuide;
@@ -1441,16 +1441,16 @@ public class MainActivity extends Activity
|| mOverlayManager.getSideFragmentManager().isActive()) {
return super.dispatchKeyEvent(event);
}
- if (BLACKLIST_KEYCODE_TO_TIS.contains(event.getKeyCode())
+ if (BLOCKLIST_KEYCODE_TO_TIS.contains(event.getKeyCode())
|| KeyEvent.isGamepadButton(event.getKeyCode())) {
- // If the event is in blacklisted or gamepad key, do not pass it to session.
- // Gamepad keys are blacklisted to support TV UIs and here's the detail.
+ // If the event is in blocklisted or gamepad key, do not pass it to session.
+ // Gamepad keys are blocklisted to support TV UIs and here's the detail.
// If there's a TIS granted RECEIVE_INPUT_EVENT, TIF sends key events to TIS
// and return immediately saying that the event is handled.
// In this case, fallback key will be injected but with FLAG_CANCELED
// while gamepads support DPAD_CENTER and BACK by fallback.
// Since we don't expect that TIS want to handle gamepad buttons now,
- // blacklist gamepad buttons and wait for next fallback keys.
+ // blocklist gamepad buttons and wait for next fallback keys.
// TODO: Need to consider other fallback keys (e.g. ESCAPE)
return super.dispatchKeyEvent(event);
}
@@ -2215,7 +2215,7 @@ public class MainActivity extends Activity
if (event.isCanceled()) {
// Ignore canceled key.
// Note that if there's a TIS granted RECEIVE_INPUT_EVENT,
- // fallback keys not blacklisted will have FLAG_CANCELED.
+ // fallback keys not blocklisted will have FLAG_CANCELED.
// See dispatchKeyEvent() for detail.
return true;
}
@@ -2330,7 +2330,7 @@ public class MainActivity extends Activity
return true;
case KeyEvent.KEYCODE_CTRL_LEFT:
case KeyEvent.KEYCODE_CTRL_RIGHT:
- mUseKeycodeBlacklist = !mUseKeycodeBlacklist;
+ mUseKeycodeBlocklist = !mUseKeycodeBlocklist;
return true;
case KeyEvent.KEYCODE_O:
mOverlayManager.getSideFragmentManager().show(new DisplayModeFragment());