From 8ed24ceef30dd0bb92d6477b0eaa10367749068c Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Fri, 8 Jun 2018 17:15:29 -0700 Subject: resolve merge conflicts of aabd6b7fa343654cd85b3b2da392e424d037d15a to pi-dev-plus-aosp BUG: None Test: m checkbuild Change-Id: Iaea1d2481a1ef0e5b1d5ae404168fb42ed923d61 Merged-In: I3181bc5683796423a98b0f9b94daf30880c07bdc --- libs/binder/ActivityManager.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'libs/binder/ActivityManager.cpp') diff --git a/libs/binder/ActivityManager.cpp b/libs/binder/ActivityManager.cpp index 2728f35408..28d0e4f9c3 100644 --- a/libs/binder/ActivityManager.cpp +++ b/libs/binder/ActivityManager.cpp @@ -34,16 +34,16 @@ sp ActivityManager::getService() std::lock_guard scoped_lock(mLock); int64_t startTime = 0; sp service = mService; - while (service == NULL || !IInterface::asBinder(service)->isBinderAlive()) { + while (service == nullptr || !IInterface::asBinder(service)->isBinderAlive()) { sp binder = defaultServiceManager()->checkService(String16("activity")); - if (binder == NULL) { + if (binder == nullptr) { // Wait for the activity service to come back... if (startTime == 0) { startTime = uptimeMillis(); ALOGI("Waiting for activity service"); } else if ((uptimeMillis() - startTime) > 1000000) { ALOGW("Waiting too long for activity service, giving up"); - service = NULL; + service = nullptr; break; } usleep(25000); @@ -58,7 +58,7 @@ sp ActivityManager::getService() int ActivityManager::openContentUri(const String16& stringUri) { sp service = getService(); - return service != NULL ? service->openContentUri(stringUri) : -1; + return service != nullptr ? service->openContentUri(stringUri) : -1; } void ActivityManager::registerUidObserver(const sp& observer, @@ -67,7 +67,7 @@ void ActivityManager::registerUidObserver(const sp& observer, const String16& callingPackage) { sp service = getService(); - if (service != NULL) { + if (service != nullptr) { service->registerUidObserver(observer, event, cutpoint, callingPackage); } } @@ -75,7 +75,7 @@ void ActivityManager::registerUidObserver(const sp& observer, void ActivityManager::unregisterUidObserver(const sp& observer) { sp service = getService(); - if (service != NULL) { + if (service != nullptr) { service->unregisterUidObserver(observer); } } @@ -83,7 +83,7 @@ void ActivityManager::unregisterUidObserver(const sp& observer) bool ActivityManager::isUidActive(const uid_t uid, const String16& callingPackage) { sp service = getService(); - if (service != NULL) { + if (service != nullptr) { return service->isUidActive(uid, callingPackage); } return false; @@ -91,7 +91,7 @@ bool ActivityManager::isUidActive(const uid_t uid, const String16& callingPackag status_t ActivityManager::linkToDeath(const sp& recipient) { sp service = getService(); - if (service != NULL) { + if (service != nullptr) { return IInterface::asBinder(service)->linkToDeath(recipient); } return INVALID_OPERATION; @@ -99,7 +99,7 @@ status_t ActivityManager::linkToDeath(const sp& recipie status_t ActivityManager::unlinkToDeath(const sp& recipient) { sp service = getService(); - if (service != NULL) { + if (service != nullptr) { return IInterface::asBinder(service)->unlinkToDeath(recipient); } return INVALID_OPERATION; -- cgit v1.2.3-59-g8ed1b