Merge "Remove adb's unused get_my_path for Windows."
diff --git a/adb/Android.mk b/adb/Android.mk
index ec7f49c..7fcb5ed 100644
--- a/adb/Android.mk
+++ b/adb/Android.mk
@@ -67,7 +67,6 @@
usb_linux.cpp \
LIBADB_windows_SRC_FILES := \
- get_my_path_windows.cpp \
sysdeps_win32.cpp \
usb_windows.cpp \
diff --git a/adb/get_my_path_windows.cpp b/adb/get_my_path_windows.cpp
deleted file mode 100644
index ed92270..0000000
--- a/adb/get_my_path_windows.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2007 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.
- */
-
-#include "sysdeps.h"
-
-#include <assert.h>
-#include <limits.h>
-#include <windows.h>
-
-#include <base/macros.h>
-
-#include "adb.h"
-
-// This is not currently called on Windows. Code that only runs on Windows
-// should probably deal with UTF-16 WCHAR/wchar_t since Windows APIs natively
-// work in that format.
-void get_my_path(char *exe, size_t maxLen) {
- WCHAR wexe[MAX_PATH];
-
- DWORD module_result = GetModuleFileNameW(NULL, wexe, arraysize(wexe));
- if ((module_result == arraysize(wexe)) || (module_result == 0)) {
- // String truncation or other error.
- wexe[0] = '\0';
- }
-
- // Convert from UTF-16 to UTF-8.
- const std::string exe_str(narrow(wexe));
-
- if (exe_str.length() + 1 <= maxLen) {
- strcpy(exe, exe_str.c_str());
- } else {
- exe[0] = '\0';
- }
-}
-