mirror of
https://github.com/samsonjs/media.git
synced 2026-06-29 05:39:31 +00:00
Reinstate non-static useExtensionRenderers method
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=193970940
This commit is contained in:
parent
301bb3ada4
commit
f96f053f2e
2 changed files with 6 additions and 3 deletions
|
|
@ -35,8 +35,6 @@ import java.io.File;
|
|||
*/
|
||||
public class DemoApplication extends Application {
|
||||
|
||||
public static final boolean USE_EXTENSION_RENDERERS = "withExtensions".equals(BuildConfig.FLAVOR);
|
||||
|
||||
private static final String DOWNLOAD_ACTION_FILE = "actions";
|
||||
private static final String DOWNLOAD_CONTENT_DIRECTORY = "downloads";
|
||||
|
||||
|
|
@ -63,6 +61,11 @@ public class DemoApplication extends Application {
|
|||
return new DefaultHttpDataSourceFactory(userAgent, listener);
|
||||
}
|
||||
|
||||
/** Returns whether extension renderers should be used. */
|
||||
public boolean useExtensionRenderers() {
|
||||
return "withExtensions".equals(BuildConfig.FLAVOR);
|
||||
}
|
||||
|
||||
/** Returns the download {@link Cache}. */
|
||||
public synchronized Cache getDownloadCache() {
|
||||
if (downloadCache == null) {
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ public class PlayerActivity extends Activity
|
|||
boolean preferExtensionDecoders =
|
||||
intent.getBooleanExtra(PREFER_EXTENSION_DECODERS_EXTRA, false);
|
||||
@DefaultRenderersFactory.ExtensionRendererMode int extensionRendererMode =
|
||||
DemoApplication.USE_EXTENSION_RENDERERS
|
||||
((DemoApplication) getApplication()).useExtensionRenderers()
|
||||
? (preferExtensionDecoders ? DefaultRenderersFactory.EXTENSION_RENDERER_MODE_PREFER
|
||||
: DefaultRenderersFactory.EXTENSION_RENDERER_MODE_ON)
|
||||
: DefaultRenderersFactory.EXTENSION_RENDERER_MODE_OFF;
|
||||
|
|
|
|||
Loading…
Reference in a new issue