Merge "Move frameworks/base to std::unique_ptr."
am: a4739b86b5
Change-Id: Ib07b6585faf4a8b3cc1c2f3e46f1ee27b4865db2
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user