Project | LOC | Modules | Lint On | Lint Off | Saved | Reduction % |
---|---|---|---|---|---|---|
fenix | 487398 | 5 | 220s | 166s | 54s | 25 |
nowinandroid | 90939 | 30 | 256s | 189s | 67s | 27 |
tivi | 180888 | 66 | 344s | 293s | 51s | 15 |
white-label | 216956 | 2 | 91s | 55s | 36s | 40 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Project | LOC (Java,Kt,XML) | Modules | Build Time (With Lint) | Lint Time | % | |
---|---|---|---|---|---|---|
mozilla/fenix | 487398 | 3 | 268s | 47s | 17 | |
android/nowinandroid | 90939 | 31 | 135s | 35s | 25 | |
chrisbanes/tivi | 180888 | 11 | 202s | 8s | 4 | |
private/white-label | 216956 | 2 | 158s | 58s | 36 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lint { | |
if (project.hasProperty("disableReleaseLint")) { | |
checkReleaseBuilds = false | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android { | |
lint { | |
checkReleaseBuilds = false | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SimplePlaybackTransportControlGlue(...) { | |
... | |
override fun onPlayCompleted() { | |
super.onPlayCompleted() | |
playbackState = PlaybackStateCompat.STATE_NONE | |
} | |
fun onStartBuffering() { | |
playbackState = PlaybackStateCompat.STATE_BUFFERING | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun invalidatePlaybackState() { | |
val playbackStateBuilder = PlaybackStateCompat.Builder() | |
.setState(playbackState, currentPosition, 1.0F) | |
.setActions(mediaSessionSupportedActions()) | |
.setBufferedPosition(bufferedPosition) | |
mediaSession.setPlaybackState(playbackStateBuilder.build()) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private var playbackState: Int = -1 | |
set(value) { | |
if (field != value) { | |
field = value | |
invalidatePlaybackState() // We'll cover this function later on. | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun mediaSessionSupportedActions(): Long { | |
return PlaybackStateCompat.ACTION_PAUSE xor | |
PlaybackStateCompat.ACTION_PLAY xor | |
PlaybackStateCompat.ACTION_PLAY_PAUSE xor | |
PlaybackStateCompat.ACTION_REWIND xor | |
PlaybackStateCompat.ACTION_FAST_FORWARD xor | |
PlaybackStateCompat.ACTION_SKIP_TO_NEXT xor | |
PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final static int STATE_NONE = 0; | |
public final static int STATE_STOPPED = 1; | |
public final static int STATE_PAUSED = 2; | |
public final static int STATE_PLAYING = 3; | |
public final static int STATE_FAST_FORWARDING = 4; | |
public final static int STATE_REWINDING = 5; | |
public final static int STATE_BUFFERING = 6; | |
public final static int STATE_ERROR = 7; | |
public final static int STATE_CONNECTING = 8; | |
public final static int STATE_SKIPPING_TO_PREVIOUS = 9; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private inner class SimpleMediaSessionCallback : MediaSessionCompat.Callback() { | |
override fun onPlay() = this@SimplePlaybackTransportControlGlue.play() | |
override fun onPause() = this@SimplePlaybackTransportControlGlue.pause() | |
override fun onSkipToNext() = this@SimplePlaybackTransportControlGlue.next() | |
override fun onSkipToPrevious() = this@SimplePlaybackTransportControlGlue.previous() | |
override fun onRewind() = this@SimplePlaybackTransportControlGlue.rewind() | |
override fun onFastForward() = this@SimplePlaybackTransportControlGlue.fastForward() | |
override fun onSeekTo(pos: Long) = this@SimplePlaybackTransportControlGlue.seekTo(pos) | |
} |
NewerOlder