Tabnine Logo
SystemProperties
Code IndexAdd Tabnine to your IDE (free)

How to use
SystemProperties
in
com.novoda.noplayer.internal.mediaplayer

Best Java code snippets using com.novoda.noplayer.internal.mediaplayer.SystemProperties (Showing top 4 results out of 315)

origin: novoda/no-player

  private boolean getBooleanProp(String prop) throws SystemProperties.MissingSystemPropertiesException {
    String value = systemProperties.get(prop);
    return "true".equalsIgnoreCase(value) || "1".equals(value);
  }
}
origin: novoda/no-player

  public AndroidMediaPlayerImpl create(Context context) {
    LoadTimeout loadTimeout = new LoadTimeout(new SystemClock(), handler);
    MediaPlayerForwarder forwarder = new MediaPlayerForwarder();
    AndroidMediaPlayerFacade facade = AndroidMediaPlayerFacade.newInstance(context, forwarder);
    PlayerListenersHolder listenersHolder = new PlayerListenersHolder();
    CheckBufferHeartbeatCallback bufferHeartbeatCallback = new CheckBufferHeartbeatCallback();
    Heart heart = Heart.newInstance(handler);
    MediaPlayerTypeReader mediaPlayerTypeReader = new MediaPlayerTypeReader(new SystemProperties(), Build.VERSION.SDK_INT);
    DelayedActionExecutor delayedActionExecutor = new DelayedActionExecutor(handler, new HashMap<DelayedActionExecutor.Action, Runnable>());
    BuggyVideoDriverPreventer preventer = new BuggyVideoDriverPreventer(mediaPlayerTypeReader);
    MediaPlayerInformation mediaPlayerInformation = new MediaPlayerInformation(mediaPlayerTypeReader);
    return new AndroidMediaPlayerImpl(
        mediaPlayerInformation,
        facade,
        forwarder,
        listenersHolder,
        bufferHeartbeatCallback,
        loadTimeout,
        heart,
        delayedActionExecutor,
        preventer
    );
  }
}
origin: novoda/no-player

private void whenPropertyisPresent(String property) throws SystemProperties.MissingSystemPropertiesException {
  when(systemProperties.get(property)).thenReturn(Boolean.TRUE.toString());
}
origin: novoda/no-player

@Test
public void givenTheUserIsNotAbleToReadSystemPropertiesWhenFetchingThePlayerTypeThenUnknownPlayerIsDetected() throws Exception {
  givenTheUserIsOnOSVersion(Build.VERSION_CODES.KITKAT);
  when(systemProperties.get(anyString())).thenThrow(new SystemProperties.MissingSystemPropertiesException(new Exception()));
  thenPlayerTypeIs(AndroidMediaPlayerType.UNKNOWN);
}
com.novoda.noplayer.internal.mediaplayerSystemProperties

Most used methods

  • get
  • <init>

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • findViewById (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now