art: retire libartpalette method PaletteGetVersion
Bug: 186016399
Test: TreeHugger
Change-Id: Ifb0055d37b728ce8246b89a00613e9a153311639
diff --git a/libartpalette/apex/palette.cc b/libartpalette/apex/palette.cc
index 9b6c49a..39b1bde 100644
--- a/libartpalette/apex/palette.cc
+++ b/libartpalette/apex/palette.cc
@@ -110,11 +110,6 @@
extern "C" {
-palette_status_t PaletteGetVersion(/*out*/int32_t* version) {
- PaletteGetVersionMethod m = PaletteLoader::Instance().GetPaletteGetVersionMethod();
- return m(version);
-}
-
palette_status_t PaletteSchedSetPriority(int32_t tid, int32_t java_priority) {
PaletteSchedSetPriorityMethod m = PaletteLoader::Instance().GetPaletteSchedSetPriorityMethod();
return m(tid, java_priority);
diff --git a/libartpalette/apex/palette_test.cc b/libartpalette/apex/palette_test.cc
index 0c5f2a6..fd17bf9 100644
--- a/libartpalette/apex/palette_test.cc
+++ b/libartpalette/apex/palette_test.cc
@@ -35,13 +35,6 @@
class PaletteClientTest : public testing::Test {};
-TEST_F(PaletteClientTest, GetVersion) {
- int32_t version = -1;
- palette_status_t status = PaletteGetVersion(&version);
- ASSERT_EQ(PALETTE_STATUS_OK, status);
- ASSERT_GE(version, 1);
-}
-
TEST_F(PaletteClientTest, SchedPriority) {
int32_t tid = GetTid();
int32_t saved_priority;
diff --git a/libartpalette/include/palette/palette_method_list.h b/libartpalette/include/palette/palette_method_list.h
index 904062e..4622850 100644
--- a/libartpalette/include/palette/palette_method_list.h
+++ b/libartpalette/include/palette/palette_method_list.h
@@ -22,7 +22,6 @@
// Methods in version 1 API
#define PALETTE_METHOD_LIST(M) \
- M(PaletteGetVersion, /*out*/int32_t* version) \
M(PaletteSchedSetPriority, int32_t tid, int32_t java_priority) \
M(PaletteSchedGetPriority, int32_t tid, /*out*/int32_t* java_priority) \
M(PaletteWriteCrashThreadStacks, const char* stacks, size_t stacks_len) \
diff --git a/libartpalette/libartpalette.map.txt b/libartpalette/libartpalette.map.txt
index d7e64a7..9a40bf7 100644
--- a/libartpalette/libartpalette.map.txt
+++ b/libartpalette/libartpalette.map.txt
@@ -17,7 +17,6 @@
LIBARTPALETTE_1 {
global:
# --- VERSION 01 API ---
- PaletteGetVersion; # apex
PaletteSchedSetPriority; # apex
PaletteSchedGetPriority; # apex
PaletteWriteCrashThreadStacks; #apex
diff --git a/libartpalette/system/palette_fake.cc b/libartpalette/system/palette_fake.cc
index 4cb6c15..bb307f2 100644
--- a/libartpalette/system/palette_fake.cc
+++ b/libartpalette/system/palette_fake.cc
@@ -24,11 +24,6 @@
#include "palette_system.h"
-palette_status_t PaletteGetVersion(int32_t* version) {
- *version = art::palette::kPaletteVersion;
- return PALETTE_STATUS_OK;
-}
-
// Cached thread priority for testing. No thread priorities are ever affected.
static std::mutex g_tid_priority_map_mutex;
static std::map<int32_t, int32_t> g_tid_priority_map;
diff --git a/libartpalette/system/palette_system.h b/libartpalette/system/palette_system.h
index b28e00d..c4137e6 100644
--- a/libartpalette/system/palette_system.h
+++ b/libartpalette/system/palette_system.h
@@ -22,8 +22,6 @@
namespace art {
namespace palette {
-static constexpr int32_t kPaletteVersion = 1;
-
// Managed thread definitions
static constexpr int32_t kNormalManagedThreadPriority = 5;
static constexpr int32_t kMinManagedThreadPriority = 1;