Home | History | Annotate | Download | only in internal

Lines Matching refs:source

2  * Copyright (C) 2016 The Android Open Source Project
65 * Tracks a request to pause the video for a source (see {@link #SOURCE_DATA_ENABLED},
70 * to pause via any source and we're not already paused.
72 * @param source The source of the pause request.
76 public boolean shouldPauseVideoFor(int source) {
79 mPauseRequests.add(source);
82 Log.i(this, "shouldPauseVideoFor: source=%s, pendingRequests=%s - should pause",
83 sourceToString(source), sourcesToString(mPauseRequests));
87 Log.i(this, "shouldPauseVideoFor: source=%s, pendingRequests=%s - already paused",
88 sourceToString(source), sourcesToString(mPauseRequests));
96 * Tracks a request to resume the video for a source (see {@link #SOURCE_DATA_ENABLED},
103 * @param source The source of the resume request.
107 public boolean shouldResumeVideoFor(int source) {
110 mPauseRequests.remove(source);
114 Log.i(this, "shouldResumeVideoFor: source=%s, pendingRequests=%s - should resume",
115 sourceToString(source), sourcesToString(mPauseRequests));
119 Log.i(this, "shouldResumeVideoFor: source=%s, pendingRequests=%s - stay paused",
120 sourceToString(source), sourcesToString(mPauseRequests));
124 Log.i(this, "shouldResumeVideoFor: source=%s, pendingRequests=%s - not paused",
125 sourceToString(source), sourcesToString(mPauseRequests));
146 * @param source the source of the pause.
147 * @return {@code true} if the specified source initiated a pause request and the video is
150 public boolean wasVideoPausedFromSource(int source) {
152 return mPauseRequests.contains(source);
168 * @param source A {@code SOURCE_*} constant.
169 * @return String equivalent of the source.
171 private String sourceToString(int source) {
172 switch (source) {
190 .map(source -> sourceToString(source))