aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authornchalko <nchalko@google.com>2019-02-19 07:10:39 -0800
committerNick Chalko <nchalko@google.com>2019-02-20 17:13:32 +0000
commit351902c895ce8b4790183550d216ef73adb8ac11 (patch)
tree0fc6eedfafc019d63439e1943c52817577b3621d /common
parent97a63874fccb180ec1717f38d0230bdb13f0178a (diff)
downloadTV-351902c895ce8b4790183550d216ef73adb8ac11.tar.gz
Move ExoplayerV2 flags to the Tuner
PiperOrigin-RevId: 234595512 Change-Id: I1b57005dcb892b7bfcfc565628979e7685d7cb08
Diffstat (limited to 'common')
-rwxr-xr-xcommon/src/com/android/tv/common/flags/ConcurrentDvrPlaybackFlags.java2
-rwxr-xr-xcommon/src/com/android/tv/common/flags/Exoplayer2Flags.java31
-rwxr-xr-xcommon/src/com/android/tv/common/flags/TunerFlags.java3
-rw-r--r--common/src/com/android/tv/common/flags/impl/DefaultExoplayer2Flags.java32
-rw-r--r--common/src/com/android/tv/common/flags/impl/DefaultFlagsModule.java7
-rw-r--r--common/src/com/android/tv/common/flags/impl/DefaultTunerFlags.java5
6 files changed, 9 insertions, 71 deletions
diff --git a/common/src/com/android/tv/common/flags/ConcurrentDvrPlaybackFlags.java b/common/src/com/android/tv/common/flags/ConcurrentDvrPlaybackFlags.java
index 76e17886..1afff793 100755
--- a/common/src/com/android/tv/common/flags/ConcurrentDvrPlaybackFlags.java
+++ b/common/src/com/android/tv/common/flags/ConcurrentDvrPlaybackFlags.java
@@ -26,7 +26,7 @@ public interface ConcurrentDvrPlaybackFlags {
*/
boolean compiled();
- /** Enable playback of DVR playback druing recording */
+ /** Enable playback of DVR playback during recording */
boolean enabled();
/** Enable tuner using recording data for playback in onTune */
diff --git a/common/src/com/android/tv/common/flags/Exoplayer2Flags.java b/common/src/com/android/tv/common/flags/Exoplayer2Flags.java
deleted file mode 100755
index 4a3956f5..00000000
--- a/common/src/com/android/tv/common/flags/Exoplayer2Flags.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-package com.android.tv.common.flags;
-
-/** Flags for using Exoplayer V2 */
-public interface Exoplayer2Flags {
-
- /**
- * Whether or not this feature is compiled into this build.
- *
- * <p>This returns true by default, unless the is_compiled_selector parameter was set during
- * code generation.
- */
- boolean compiled();
-
- /** Enable using exoplayer V2 */
- boolean enabled();
-}
diff --git a/common/src/com/android/tv/common/flags/TunerFlags.java b/common/src/com/android/tv/common/flags/TunerFlags.java
index f1d91113..5f899b90 100755
--- a/common/src/com/android/tv/common/flags/TunerFlags.java
+++ b/common/src/com/android/tv/common/flags/TunerFlags.java
@@ -28,4 +28,7 @@ public interface TunerFlags {
/** Tune using current recording if available. */
boolean tuneUsingRecording();
+
+ /** Enable using exoplayer V2 */
+ boolean useExoplayerV2();
}
diff --git a/common/src/com/android/tv/common/flags/impl/DefaultExoplayer2Flags.java b/common/src/com/android/tv/common/flags/impl/DefaultExoplayer2Flags.java
deleted file mode 100644
index 0e1fd2fc..00000000
--- a/common/src/com/android/tv/common/flags/impl/DefaultExoplayer2Flags.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.tv.common.flags.impl;
-
-import com.android.tv.common.flags.Exoplayer2Flags;
-
-/** Default Flags for using Exoplayer V2 */
-public class DefaultExoplayer2Flags implements Exoplayer2Flags {
-
- @Override
- public boolean compiled() {
- return true;
- }
-
- @Override
- public boolean enabled() {
- return false;
- }
-}
diff --git a/common/src/com/android/tv/common/flags/impl/DefaultFlagsModule.java b/common/src/com/android/tv/common/flags/impl/DefaultFlagsModule.java
index 3ff6ddf4..49352364 100644
--- a/common/src/com/android/tv/common/flags/impl/DefaultFlagsModule.java
+++ b/common/src/com/android/tv/common/flags/impl/DefaultFlagsModule.java
@@ -21,7 +21,6 @@ import dagger.Reusable;
import com.android.tv.common.flags.BackendKnobsFlags;
import com.android.tv.common.flags.CloudEpgFlags;
import com.android.tv.common.flags.ConcurrentDvrPlaybackFlags;
-import com.android.tv.common.flags.Exoplayer2Flags;
import com.android.tv.common.flags.TunerFlags;
import com.android.tv.common.flags.UiFlags;
@@ -49,12 +48,6 @@ public class DefaultFlagsModule {
@Provides
@Reusable
- Exoplayer2Flags provideExoplayer2Flags() {
- return new DefaultExoplayer2Flags();
- }
-
- @Provides
- @Reusable
TunerFlags provideTunerFlags() {
return new DefaultTunerFlags();
}
diff --git a/common/src/com/android/tv/common/flags/impl/DefaultTunerFlags.java b/common/src/com/android/tv/common/flags/impl/DefaultTunerFlags.java
index 24941004..195953bc 100644
--- a/common/src/com/android/tv/common/flags/impl/DefaultTunerFlags.java
+++ b/common/src/com/android/tv/common/flags/impl/DefaultTunerFlags.java
@@ -29,4 +29,9 @@ public class DefaultTunerFlags implements TunerFlags {
public boolean tuneUsingRecording() {
return false;
}
+
+ @Override
+ public boolean useExoplayerV2() {
+ return false;
+ }
}