summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/aapt/CrunchCache.cpp1
-rw-r--r--tools/aapt/Main.cpp1
-rw-r--r--tools/aidl/aidl.cpp5
-rw-r--r--tools/aidl/os.h26
-rw-r--r--tools/aidl/search_path.cpp1
-rw-r--r--tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePackageManager.java5
6 files changed, 37 insertions, 2 deletions
diff --git a/tools/aapt/CrunchCache.cpp b/tools/aapt/CrunchCache.cpp
index 6c39d1d7753c..0d574cf127dd 100644
--- a/tools/aapt/CrunchCache.cpp
+++ b/tools/aapt/CrunchCache.cpp
@@ -5,6 +5,7 @@
// This file defines functions laid out and documented in
// CrunchCache.h
+#include <utils/Compat.h>
#include <utils/Vector.h>
#include <utils/String8.h>
diff --git a/tools/aapt/Main.cpp b/tools/aapt/Main.cpp
index f832c605376c..bcf0d5e53c07 100644
--- a/tools/aapt/Main.cpp
+++ b/tools/aapt/Main.cpp
@@ -6,6 +6,7 @@
#include "Main.h"
#include "Bundle.h"
+#include <utils/Compat.h>
#include <utils/Log.h>
#include <utils/threads.h>
#include <utils/List.h>
diff --git a/tools/aidl/aidl.cpp b/tools/aidl/aidl.cpp
index e31b03c07e9a..368e73d05f18 100644
--- a/tools/aidl/aidl.cpp
+++ b/tools/aidl/aidl.cpp
@@ -1,6 +1,7 @@
#include "aidl_language.h"
#include "options.h"
+#include "os.h"
#include "search_path.h"
#include "Type.h"
#include "generate_java.h"
@@ -177,7 +178,7 @@ check_filename(const char* filename, const char* package, buffer_type* name)
char cwd[MAXPATHLEN];
bool valid = false;
-#ifdef HAVE_WINDOWS_PATHS
+#ifdef _WIN32
if (isalpha(filename[0]) && filename[1] == ':'
&& filename[2] == OS_PATH_SEPARATOR) {
#else
@@ -217,7 +218,7 @@ check_filename(const char* filename, const char* package, buffer_type* name)
if (valid) {
p = fn.c_str() + (len - expected.length());
-#ifdef HAVE_WINDOWS_PATHS
+#ifdef _WIN32
if (OS_PATH_SEPARATOR != '/') {
// Input filename under cygwin most likely has / separators
// whereas the expected string uses \\ separators. Adjust
diff --git a/tools/aidl/os.h b/tools/aidl/os.h
new file mode 100644
index 000000000000..79d2c35eea3d
--- /dev/null
+++ b/tools/aidl/os.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2015, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _FRAMEWORKS_BASE_TOOLS_AIDL_OS_SEP_H_
+#define _FRAMEWORKS_BASE_TOOLS_AIDL_OS_SEP_H_
+
+#if defined(_WIN32)
+#define OS_PATH_SEPARATOR '\\'
+#else
+#define OS_PATH_SEPARATOR '/'
+#endif
+
+#endif
diff --git a/tools/aidl/search_path.cpp b/tools/aidl/search_path.cpp
index ffb6cb2932e4..29dbe260c4f1 100644
--- a/tools/aidl/search_path.cpp
+++ b/tools/aidl/search_path.cpp
@@ -1,6 +1,7 @@
#include <unistd.h>
#include "search_path.h"
#include "options.h"
+#include "os.h"
#include <string.h>
#ifdef HAVE_MS_C_RUNTIME
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePackageManager.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePackageManager.java
index 90ef28cd0fc3..f04654eded0f 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePackageManager.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePackageManager.java
@@ -172,6 +172,11 @@ public class BridgePackageManager extends PackageManager {
}
@Override
+ public String getPermissionControllerPackageName() {
+ return null;
+ }
+
+ @Override
public boolean addPermission(PermissionInfo info) {
return false;
}