Commit f620c555 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

playback: don't leak meta data to the OS if passcode lock is enabled since...

playback: don't leak meta data to the OS if passcode lock is enabled since this voids the privacy added by the lock
parent 6d21e939
......@@ -19,6 +19,8 @@ Interface:
more precisely (iPad only)
* Previously removed episodes and tracks no longer show up in the respective
group listings (#9705)
* Improved privacy by requesting the passcode 2 minutes after leaving the app
and by obfuscating playback metadata if passcode lock is enabled
Cloud interaction:
* Added support for downloads from Google Drive (#8690)
......
......@@ -1149,10 +1149,17 @@
}
MLFile * currentFile = _mediaItem;
/* don't leak sensitive information to the OS, if passcode lock is enabled */
BOOL passcodeLockEnabled = [[[NSUserDefaults standardUserDefaults] objectForKey:kVLCSettingPasscodeOnKey] boolValue];
/* we omit artwork for now since we had to read it from storage as we can't access
* the artwork cache at the moment - FIXME? */
NSMutableDictionary *currentlyPlayingTrackInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys: currentFile.title, MPMediaItemPropertyTitle, @(currentFile.duration.intValue / 1000.), MPMediaItemPropertyPlaybackDuration, @(_mediaPlayer.time.intValue / 1000.), MPNowPlayingInfoPropertyElapsedPlaybackTime, @(_mediaPlayer.rate), MPNowPlayingInfoPropertyPlaybackRate, nil];
if ([currentFile isAlbumTrack]) {
NSMutableDictionary *currentlyPlayingTrackInfo;
if (passcodeLockEnabled)
currentlyPlayingTrackInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys:@(currentFile.duration.intValue / 1000.), MPMediaItemPropertyPlaybackDuration, @(_mediaPlayer.time.intValue / 1000.), MPNowPlayingInfoPropertyElapsedPlaybackTime, @(_mediaPlayer.rate), MPNowPlayingInfoPropertyPlaybackRate, nil];
else
currentlyPlayingTrackInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys: currentFile.title, MPMediaItemPropertyTitle, @(currentFile.duration.intValue / 1000.), MPMediaItemPropertyPlaybackDuration, @(_mediaPlayer.time.intValue / 1000.), MPNowPlayingInfoPropertyElapsedPlaybackTime, @(_mediaPlayer.rate), MPNowPlayingInfoPropertyPlaybackRate, nil];
if ([currentFile isAlbumTrack] && !passcodeLockEnabled) {
MLAlbumTrack *track = currentFile.albumTrack;
if (track.artist.length > 0)
[currentlyPlayingTrackInfo setObject:track.artist forKey:MPMediaItemPropertyArtist];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment