Merge "Move frameworks/base to std::unique_ptr." am: a4739b86b5

am: 96b3bc7aff

Change-Id: Iac739b0a727558893696b8d8454d63dfb39c548a
This commit is contained in:
Elliott Hughes
2016-09-12 17:07:44 +00:00
committed by android-build-merger
2 changed files with 6 additions and 6 deletions

View File

@@ -23,9 +23,9 @@
#include "selinux/selinux.h"
#include "selinux/android.h"
#include <errno.h>
#include <memory>
#include <ScopedLocalRef.h>
#include <ScopedUtfChars.h>
#include <UniquePtr.h>
namespace android {
@@ -34,7 +34,7 @@ struct SecurityContext_Delete {
freecon(p);
}
};
typedef UniquePtr<char[], SecurityContext_Delete> Unique_SecurityContext;
typedef std::unique_ptr<char[], SecurityContext_Delete> Unique_SecurityContext;
static jboolean isSELinuxDisabled = true;
@@ -112,7 +112,7 @@ static jboolean setFSCreateCon(JNIEnv *env, jobject, jstring contextStr) {
return false;
}
UniquePtr<ScopedUtfChars> context;
std::unique_ptr<ScopedUtfChars> context;
const char* context_c_str = NULL;
if (contextStr != NULL) {
context.reset(new ScopedUtfChars(env, contextStr));

View File

@@ -20,7 +20,6 @@
#include "core_jni_helpers.h"
#include <ScopedUtfChars.h>
#include <UniquePtr.h>
#include <androidfw/ZipFileRO.h>
#include <androidfw/ZipUtils.h>
#include <utils/Log.h>
@@ -37,6 +36,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <memory>
#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<NativeLibrariesIterator> it(NativeLibrariesIterator::create(zipFile));
std::unique_ptr<NativeLibrariesIterator> 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<NativeLibrariesIterator> it(NativeLibrariesIterator::create(zipFile));
std::unique_ptr<NativeLibrariesIterator> it(NativeLibrariesIterator::create(zipFile));
if (it.get() == NULL) {
return INSTALL_FAILED_INVALID_APK;
}