Merge "Build com.android.media.remotedisplay with java_sdk_library"

This commit is contained in:
Treehugger Robot
2018-10-15 01:32:16 +00:00
committed by Gerrit Code Review
13 changed files with 67 additions and 84 deletions

View File

@@ -247,6 +247,7 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/statsd
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/com.android.mediadrm.signer.jar)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/com.android.location.provider.jar)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/com.android.future.usb.accessory.jar)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/com.android.media.remotedisplay.jar)
# ******************************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST ABOVE THIS BANNER
# ******************************************************************

View File

@@ -14,22 +14,8 @@
// limitations under the License.
//
droiddoc {
name: "com.android.media.remotedisplay.stubs-gen-docs",
srcs: [
"java/**/*.java",
],
args: " -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " +
" -stubpackages com.android.media.remotedisplay " +
" -nodocs ",
custom_template: "droiddoc-templates-sdk",
installable: false,
}
java_library_static {
name: "com.android.media.remotedisplay.stubs",
srcs: [
":com.android.media.remotedisplay.stubs-gen-docs",
],
sdk_version: "current",
java_sdk_library {
name: "com.android.media.remotedisplay",
srcs: ["java/**/*.java"],
api_packages: ["com.android.media.remotedisplay"],
}

View File

@@ -1,44 +0,0 @@
#
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
LOCAL_PATH := $(call my-dir)
# the remotedisplay library
# ============================================================
include $(CLEAR_VARS)
LOCAL_MODULE:= com.android.media.remotedisplay
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, java)
include $(BUILD_JAVA_LIBRARY)
# ==== com.android.media.remotedisplay.xml lib def ========================
include $(CLEAR_VARS)
LOCAL_MODULE := com.android.media.remotedisplay.xml
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
# This will install the file in /system/etc/permissions
#
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/permissions
LOCAL_SRC_FILES := $(LOCAL_MODULE)
include $(BUILD_PREBUILT)

View File

View File

View File

@@ -0,0 +1,52 @@
package com.android.media.remotedisplay {
public class RemoteDisplay {
ctor public RemoteDisplay(java.lang.String, java.lang.String);
method public java.lang.String getDescription();
method public java.lang.String getId();
method public java.lang.String getName();
method public int getPresentationDisplayId();
method public int getStatus();
method public int getVolume();
method public int getVolumeHandling();
method public int getVolumeMax();
method public void setDescription(java.lang.String);
method public void setName(java.lang.String);
method public void setPresentationDisplayId(int);
method public void setStatus(int);
method public void setVolume(int);
method public void setVolumeHandling(int);
method public void setVolumeMax(int);
field public static final int PLAYBACK_VOLUME_FIXED = 0; // 0x0
field public static final int PLAYBACK_VOLUME_VARIABLE = 1; // 0x1
field public static final int STATUS_AVAILABLE = 2; // 0x2
field public static final int STATUS_CONNECTED = 4; // 0x4
field public static final int STATUS_CONNECTING = 3; // 0x3
field public static final int STATUS_IN_USE = 1; // 0x1
field public static final int STATUS_NOT_AVAILABLE = 0; // 0x0
}
public abstract class RemoteDisplayProvider {
ctor public RemoteDisplayProvider(android.content.Context);
method public void addDisplay(com.android.media.remotedisplay.RemoteDisplay);
method public com.android.media.remotedisplay.RemoteDisplay findRemoteDisplay(java.lang.String);
method public android.os.IBinder getBinder();
method public final android.content.Context getContext();
method public int getDiscoveryMode();
method public java.util.Collection<com.android.media.remotedisplay.RemoteDisplay> getDisplays();
method public android.app.PendingIntent getSettingsPendingIntent();
method public void onAdjustVolume(com.android.media.remotedisplay.RemoteDisplay, int);
method public void onConnect(com.android.media.remotedisplay.RemoteDisplay);
method public void onDisconnect(com.android.media.remotedisplay.RemoteDisplay);
method public void onDiscoveryModeChanged(int);
method public void onSetVolume(com.android.media.remotedisplay.RemoteDisplay, int);
method public void removeDisplay(com.android.media.remotedisplay.RemoteDisplay);
method public void updateDisplay(com.android.media.remotedisplay.RemoteDisplay);
field public static final int DISCOVERY_MODE_ACTIVE = 2; // 0x2
field public static final int DISCOVERY_MODE_NONE = 0; // 0x0
field public static final int DISCOVERY_MODE_PASSIVE = 1; // 0x1
field public static final java.lang.String SERVICE_INTERFACE = "com.android.media.remotedisplay.RemoteDisplayProvider";
}
}

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<permissions>
<library name="com.android.media.remotedisplay"
file="/system/framework/com.android.media.remotedisplay.jar" />
</permissions>

View File

@@ -16,6 +16,7 @@
package com.android.media.remotedisplay;
import android.annotation.SystemApi;
import android.media.RemoteDisplayState.RemoteDisplayInfo;
import android.text.TextUtils;
@@ -23,7 +24,10 @@ import java.util.Objects;
/**
* Represents a remote display that has been discovered.
*
* @hide
*/
@SystemApi
public class RemoteDisplay {
private final RemoteDisplayInfo mMutableInfo;
private RemoteDisplayInfo mImmutableInfo;

View File

@@ -16,6 +16,7 @@
package com.android.media.remotedisplay;
import android.annotation.SystemApi;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Context;
@@ -88,7 +89,10 @@ import java.util.Collection;
* IMPORTANT: This class is effectively a public API for unbundled applications, and
* must remain API stable. See README.txt in the root of this package for more information.
* </p>
*
* @hide
*/
@SystemApi
public abstract class RemoteDisplayProvider {
private static final int MSG_SET_CALLBACK = 1;
private static final int MSG_SET_DISCOVERY_MODE = 2;

View File

@@ -18,9 +18,9 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := RemoteDisplayProviderTest
LOCAL_MODULE_TAGS := tests
LOCAL_SDK_VERSION := current
LOCAL_SDK_VERSION := system_current
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR = $(LOCAL_PATH)/res
LOCAL_JAVA_LIBRARIES := com.android.media.remotedisplay.stubs
LOCAL_JAVA_LIBRARIES := com.android.media.remotedisplay
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)