From 93bb56ef1525314707dafe5c849916b1d44d15ea Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Sun, 11 Sep 2016 14:50:12 -0700 Subject: Move frameworks/base to std::unique_ptr. Bug: http://b/22403888 Change-Id: Iae2c68b00be7cd9dd215a75cf80b16d7403f6328 --- core/jni/android_os_SELinux.cpp | 6 +++--- core/jni/com_android_internal_content_NativeLibraryHelper.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/jni/android_os_SELinux.cpp b/core/jni/android_os_SELinux.cpp index 8ba77aed1d04..4b68c0dad038 100644 --- a/core/jni/android_os_SELinux.cpp +++ b/core/jni/android_os_SELinux.cpp @@ -23,9 +23,9 @@ #include "selinux/selinux.h" #include "selinux/android.h" #include +#include #include #include -#include namespace android { @@ -34,7 +34,7 @@ struct SecurityContext_Delete { freecon(p); } }; -typedef UniquePtr Unique_SecurityContext; +typedef std::unique_ptr Unique_SecurityContext; static jboolean isSELinuxDisabled = true; @@ -112,7 +112,7 @@ static jboolean setFSCreateCon(JNIEnv *env, jobject, jstring contextStr) { return false; } - UniquePtr context; + std::unique_ptr context; const char* context_c_str = NULL; if (contextStr != NULL) { context.reset(new ScopedUtfChars(env, contextStr)); diff --git a/core/jni/com_android_internal_content_NativeLibraryHelper.cpp b/core/jni/com_android_internal_content_NativeLibraryHelper.cpp index 364ac44ee0f6..7e016576d70a 100644 --- a/core/jni/com_android_internal_content_NativeLibraryHelper.cpp +++ b/core/jni/com_android_internal_content_NativeLibraryHelper.cpp @@ -20,7 +20,6 @@ #include "core_jni_helpers.h" #include -#include #include #include #include @@ -37,6 +36,7 @@ #include #include +#include #define APK_LIB "lib/" #define APK_LIB_LEN (sizeof(APK_LIB) - 1) @@ -398,7 +398,7 @@ iterateOverNativeFiles(JNIEnv *env, jlong apkHandle, jstring javaCpuAbi, return INSTALL_FAILED_INVALID_APK; } - UniquePtr it(NativeLibrariesIterator::create(zipFile)); + std::unique_ptr it(NativeLibrariesIterator::create(zipFile)); if (it.get() == NULL) { return INSTALL_FAILED_INVALID_APK; } @@ -446,7 +446,7 @@ static int findSupportedAbi(JNIEnv *env, jlong apkHandle, jobjectArray supported return INSTALL_FAILED_INVALID_APK; } - UniquePtr it(NativeLibrariesIterator::create(zipFile)); + std::unique_ptr it(NativeLibrariesIterator::create(zipFile)); if (it.get() == NULL) { return INSTALL_FAILED_INVALID_APK; } -- cgit v1.2.3-59-g8ed1b