summaryrefslogtreecommitdiffstats
path: root/media/java/android
diff options
context:
space:
mode:
Diffstat (limited to 'media/java/android')
-rw-r--r--media/java/android/media/tv/TvContract.java6
-rw-r--r--media/java/android/media/tv/TvInputInfo.java12
-rw-r--r--media/java/android/media/tv/TvInputManager.java2
-rw-r--r--media/java/android/media/tv/TvInputService.java19
-rw-r--r--media/java/android/media/tv/TvView.java2
5 files changed, 19 insertions, 22 deletions
diff --git a/media/java/android/media/tv/TvContract.java b/media/java/android/media/tv/TvContract.java
index a06f848..da5f33e 100644
--- a/media/java/android/media/tv/TvContract.java
+++ b/media/java/android/media/tv/TvContract.java
@@ -282,12 +282,12 @@ public final class TvContract {
return ContentUris.withAppendedId(WatchedPrograms.CONTENT_URI, watchedProgramId);
}
- private static final boolean isTvUri(Uri uri) {
+ private static boolean isTvUri(Uri uri) {
return uri != null && ContentResolver.SCHEME_CONTENT.equals(uri.getScheme())
&& AUTHORITY.equals(uri.getAuthority());
}
- private static final boolean isTwoSegmentUriStartingWith(Uri uri, String pathSegment) {
+ private static boolean isTwoSegmentUriStartingWith(Uri uri, String pathSegment) {
List<String> pathSegments = uri.getPathSegments();
return pathSegments.size() == 2 && pathSegment.equals(pathSegments.get(0));
}
@@ -565,7 +565,7 @@ public final class TvContract {
* defined there (e.g. ETSI EN 300 468/TR 101 211 and ARIB STD-B10). If channels cannot be
* globally identified by 2-tuple {{@link #COLUMN_TRANSPORT_STREAM_ID},
* {@link #COLUMN_SERVICE_ID}}, one must carefully assign a value to this field to form a
- * unique 3-tuple identification {{@link #COLUMN_ORIGINAL_NETWORK_ID},
+ * unique 3-tuple identification {{@code COLUMN_ORIGINAL_NETWORK_ID},
* {@link #COLUMN_TRANSPORT_STREAM_ID}, {@link #COLUMN_SERVICE_ID}} for its channels.
*
* <p>This is a required field if the channel cannot be uniquely identified by a 2-tuple
diff --git a/media/java/android/media/tv/TvInputInfo.java b/media/java/android/media/tv/TvInputInfo.java
index 5d1aa14..ce72c2f 100644
--- a/media/java/android/media/tv/TvInputInfo.java
+++ b/media/java/android/media/tv/TvInputInfo.java
@@ -106,7 +106,7 @@ public final class TvInputInfo implements Parcelable {
*/
public static final String EXTRA_INPUT_ID = "android.media.tv.extra.INPUT_ID";
- private static SparseIntArray sHardwareTypeToTvInputType = new SparseIntArray();
+ private static final SparseIntArray sHardwareTypeToTvInputType = new SparseIntArray();
private static final String XML_START_TAG_NAME = "tv-input";
private static final String DELIMITER_INFO_IN_ID = "/";
@@ -594,7 +594,7 @@ public final class TvInputInfo implements Parcelable {
* @param name the component name for generating an input id.
* @return the generated input id for the given {@code name}.
*/
- private static final String generateInputIdForComponentName(ComponentName name) {
+ private static String generateInputIdForComponentName(ComponentName name) {
return name.flattenToShortString();
}
@@ -605,7 +605,7 @@ public final class TvInputInfo implements Parcelable {
* @param deviceInfo HdmiDeviceInfo describing this TV input.
* @return the generated input id for the given {@code name} and {@code deviceInfo}.
*/
- private static final String generateInputIdForHdmiDevice(
+ private static String generateInputIdForHdmiDevice(
ComponentName name, HdmiDeviceInfo deviceInfo) {
// Example of the format : "/HDMI%04X%02X"
String format = DELIMITER_INFO_IN_ID + PREFIX_HDMI_DEVICE
@@ -622,7 +622,7 @@ public final class TvInputInfo implements Parcelable {
* @param hardwareInfo TvInputHardwareInfo describing this TV input.
* @return the generated input id for the given {@code name} and {@code hardwareInfo}.
*/
- private static final String generateInputIdForHardware(
+ private static String generateInputIdForHardware(
ComponentName name, TvInputHardwareInfo hardwareInfo) {
return name.flattenToShortString() + DELIMITER_INFO_IN_ID + PREFIX_HARDWARE_DEVICE
+ hardwareInfo.getDeviceId();
@@ -648,13 +648,13 @@ public final class TvInputInfo implements Parcelable {
mSetupActivity = in.readString();
mSettingsActivity = in.readString();
mType = in.readInt();
- mIsHardwareInput = in.readByte() == 1 ? true : false;
+ mIsHardwareInput = in.readByte() == 1;
mHdmiDeviceInfo = in.readParcelable(null);
mIcon = in.readParcelable(null);
mIconUri = in.readParcelable(null);
mLabelRes = in.readInt();
mLabel = in.readString();
- mIsConnectedToHdmiSwitch = in.readByte() == 1 ? true : false;
+ mIsConnectedToHdmiSwitch = in.readByte() == 1;
}
/**
diff --git a/media/java/android/media/tv/TvInputManager.java b/media/java/android/media/tv/TvInputManager.java
index 38f2d04..eea607c 100644
--- a/media/java/android/media/tv/TvInputManager.java
+++ b/media/java/android/media/tv/TvInputManager.java
@@ -1929,7 +1929,7 @@ public final class TvInputManager {
* @param handled {@code true} if the dispatched input event was handled properly.
* {@code false} otherwise.
*/
- public void onFinishedInputEvent(Object token, boolean handled);
+ void onFinishedInputEvent(Object token, boolean handled);
}
// Must be called on the main looper
diff --git a/media/java/android/media/tv/TvInputService.java b/media/java/android/media/tv/TvInputService.java
index f52ccc9..35037bb 100644
--- a/media/java/android/media/tv/TvInputService.java
+++ b/media/java/android/media/tv/TvInputService.java
@@ -233,10 +233,7 @@ public abstract class TvInputService extends Service {
mTvInputManager = (TvInputManager) getSystemService(Context.TV_INPUT_SERVICE);
}
TvInputInfo info = mTvInputManager.getTvInputInfo(inputId);
- if (info != null && info.isPassthroughInput()) {
- return true;
- }
- return false;
+ return info != null && info.isPassthroughInput();
}
/**
@@ -1383,7 +1380,7 @@ public abstract class TvInputService extends Service {
}
}
- private final void executeOrPostRunnable(Runnable action) {
+ private void executeOrPostRunnable(Runnable action) {
synchronized(mLock) {
if (mSessionCallback == null) {
// The session is not initialized yet.
@@ -1651,13 +1648,13 @@ public abstract class TvInputService extends Service {
if (sessionImpl instanceof HardwareSession) {
HardwareSession proxySession =
((HardwareSession) sessionImpl);
- String harewareInputId = proxySession.getHardwareInputId();
- if (TextUtils.isEmpty(harewareInputId) ||
- !isPassthroughInput(harewareInputId)) {
- if (TextUtils.isEmpty(harewareInputId)) {
+ String hardwareInputId = proxySession.getHardwareInputId();
+ if (TextUtils.isEmpty(hardwareInputId) ||
+ !isPassthroughInput(hardwareInputId)) {
+ if (TextUtils.isEmpty(hardwareInputId)) {
Log.w(TAG, "Hardware input id is not setup yet.");
} else {
- Log.w(TAG, "Invalid hardware input id : " + harewareInputId);
+ Log.w(TAG, "Invalid hardware input id : " + hardwareInputId);
}
sessionImpl.onRelease();
try {
@@ -1672,7 +1669,7 @@ public abstract class TvInputService extends Service {
proxySession.mServiceHandler = mServiceHandler;
TvInputManager manager = (TvInputManager) getSystemService(
Context.TV_INPUT_SERVICE);
- manager.createSession(harewareInputId,
+ manager.createSession(hardwareInputId,
proxySession.mHardwareSessionCallback, mServiceHandler);
} else {
SomeArgs someArgs = SomeArgs.obtain();
diff --git a/media/java/android/media/tv/TvView.java b/media/java/android/media/tv/TvView.java
index d8d0bdc..64333ad 100644
--- a/media/java/android/media/tv/TvView.java
+++ b/media/java/android/media/tv/TvView.java
@@ -191,7 +191,7 @@ public class TvView extends ViewGroup {
* the active source.
*
* <p>First tuned {@link TvView} becomes main automatically, and keeps to be main until either
- * {@link #reset} is called for the main {@link TvView} or {@link #setMain} is called for other
+ * {@link #reset} is called for the main {@link TvView} or {@code setMain()} is called for other
* {@link TvView}.
* @hide
*/