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
- (NSString *)prepareUrl { | |
NSMutableArray *queryComponents = [NSMutableArray new]; | |
if (query != nil) { | |
[queryComponents addObject:[NSString stringWithFormat:@"query=%@", query]]; | |
} | |
if (orderBy != nil) { | |
[queryComponents addObject:[NSString stringWithFormat:@"orderBy=%@", orderBy]]; | |
} | |
if (sortOrder != nil) { |
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
- (NSString *)prepareUrl { | |
NSInteger parameterCounter = 0; | |
NSString *pageUri = @"https://example.com?"; | |
if (query != nil) { | |
query = [NSString stringWithFormat:@"query=%@", query]; | |
query = [self addAmpersandIfNeededForParameter:query currentParameterCounter:parameterCounter]; | |
pageUri = [pageUri stringByAppendingString:query]; | |
parameterCounter++; | |
} | |
if (orderBy != nil) { |
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 class TableViewSplitDelegate: NSObject, UITableViewDelegate { | |
weak var scrollViewDelegate: UIScrollViewDelegate? | |
weak var tableViewDelegate: UITableViewDelegate? | |
override public func forwardingTarget(for aSelector: Selector!) -> Any? { | |
if selectorIsPartOfUIScrollViewDelegate(selector: aSelector) { | |
return scrollViewDelegate | |
} | |
if selectorIsPartOfUITableViewDelegate(selector: aSelector) { | |
return tableViewDelegate |
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 class BrokenSimpleSessionImpl extends TvInputService.Session { | |
// ... | |
private void setAudioTracks() { | |
List<TvTrackInfo> trackInfoList = new ArrayList<>(); | |
for (int i = 0; i < audioTrackCount; i++) { | |
MediaFormat format = player.getTrackFormat(DemoPlayer.TYPE_AUDIO, i); | |
TvTrackInfo trackInfo = new TvTrackInfo | |
.Builder(TvTrackInfo.TYPE_AUDIO, String.valueOf(i)) | |
.setLanguage("Track " + i) // The only changes are here |
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 class WorkingSimpleSessionImpl extends TvInputService.Session { | |
// ... | |
private void setAudioTracks() { | |
List<TvTrackInfo> trackInfoList = new ArrayList<>(); | |
for (int i = 0; i < audioTrackCount; i++) { | |
MediaFormat format = player.getTrackFormat(DemoPlayer.TYPE_AUDIO, i); | |
TvTrackInfo trackInfo = new TvTrackInfo | |
.Builder(TvTrackInfo.TYPE_AUDIO, String.valueOf(i)) | |
.build() |