Revert "Revert "Begin cleanup of HidlBinderSupport.h includes.""
This reverts commit 9211951e255d5f129a977a7313e394d73af3fe42.
Bug: 65843592
Reason for revert: Now that devices have been fixed.
Change-Id: I692a8a69ce736abc3d4c08af771f2999a5e772ee
diff --git a/transport/HidlTransportSupport.cpp b/transport/HidlTransportSupport.cpp
index 9c2bf25..b214f1a 100644
--- a/transport/HidlTransportSupport.cpp
+++ b/transport/HidlTransportSupport.cpp
@@ -13,9 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include <hidl/HidlTransportSupport.h>
#include <hidl/HidlBinderSupport.h>
+#include <hidl/HidlTransportSupport.h>
+#include <hidl/Static.h>
+#include <android-base/logging.h>
#include <android/hidl/manager/1.0/IServiceManager.h>
namespace android {
@@ -41,20 +43,20 @@
bool setMinSchedulerPolicy(const sp<::android::hidl::base::V1_0::IBase>& service,
int policy, int priority) {
if (service->isRemote()) {
- ALOGE("Can't set scheduler policy on remote service.");
+ LOG(ERROR) << "Can't set scheduler policy on remote service.";
return false;
}
if (policy != SCHED_NORMAL && policy != SCHED_FIFO && policy != SCHED_RR) {
- ALOGE("Invalid scheduler policy %d", policy);
+ LOG(ERROR) << "Invalid scheduler policy " << policy;
return false;
}
if (policy == SCHED_NORMAL && (priority < -20 || priority > 19)) {
- ALOGE("Invalid priority for SCHED_NORMAL: %d", priority);
+ LOG(ERROR) << "Invalid priority for SCHED_NORMAL: " << priority;
return false;
} else if (priority < 1 || priority > 99) {
- ALOGE("Invalid priority for real-time policy: %d", priority);
+ LOG(ERROR) << "Invalid priority for real-time policy: " << priority;
return false;
}