Filename refactoring, remove DEXOPT_OTA flag.
Test: builds, boots
Bug: 13758960, 30944031
Change-Id: Ib60899fc70b12f76fad9dfad596b513777752703
diff --git a/cmds/installd/Android.bp b/cmds/installd/Android.bp
index e4e652a..93174bf 100644
--- a/cmds/installd/Android.bp
+++ b/cmds/installd/Android.bp
@@ -6,7 +6,7 @@
"-Werror",
],
srcs: [
- "commands.cpp",
+ "InstalldNativeService.cpp",
"dexopt.cpp",
"globals.cpp",
"utils.cpp",
diff --git a/cmds/installd/Android.mk b/cmds/installd/Android.mk
index 2f13998..8bf0b53 100644
--- a/cmds/installd/Android.mk
+++ b/cmds/installd/Android.mk
@@ -24,7 +24,7 @@
LOCAL_CFLAGS += -DART_BASE_ADDRESS_MIN_DELTA=$(LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA)
LOCAL_CFLAGS += -DART_BASE_ADDRESS_MAX_DELTA=$(LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA)
-LOCAL_SRC_FILES := otapreopt.cpp commands.cpp globals.cpp utils.cpp dexopt.cpp binder/android/os/IInstalld.aidl
+LOCAL_SRC_FILES := otapreopt.cpp InstalldNativeService.cpp globals.cpp utils.cpp dexopt.cpp binder/android/os/IInstalld.aidl
LOCAL_SHARED_LIBRARIES := \
libbase \
libbinder \
diff --git a/cmds/installd/commands.cpp b/cmds/installd/InstalldNativeService.cpp
similarity index 99%
rename from cmds/installd/commands.cpp
rename to cmds/installd/InstalldNativeService.cpp
index facf7a4..5d01368 100644
--- a/cmds/installd/commands.cpp
+++ b/cmds/installd/InstalldNativeService.cpp
@@ -14,7 +14,7 @@
** limitations under the License.
*/
-#include "commands.h"
+#include "InstalldNativeService.h"
#include <errno.h>
#include <inttypes.h>
@@ -42,12 +42,11 @@
#include <selinux/android.h>
#include <system/thread_defs.h>
-#include <globals.h>
-#include <installd_deps.h>
-#include <otapreopt_utils.h>
-#include <utils.h>
-
#include "dexopt.h"
+#include "globals.h"
+#include "installd_deps.h"
+#include "otapreopt_utils.h"
+#include "utils.h"
#ifndef LOG_TAG
#define LOG_TAG "installd"
diff --git a/cmds/installd/commands.h b/cmds/installd/InstalldNativeService.h
similarity index 96%
rename from cmds/installd/commands.h
rename to cmds/installd/InstalldNativeService.h
index f921d2f..749a218 100644
--- a/cmds/installd/commands.h
+++ b/cmds/installd/InstalldNativeService.h
@@ -2,16 +2,16 @@
**
** Copyright 2008, 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
+** 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
+** 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
+** 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.
*/
diff --git a/cmds/installd/binder/android/os/IInstalld.aidl b/cmds/installd/binder/android/os/IInstalld.aidl
index a8233db..bcfaca8 100644
--- a/cmds/installd/binder/android/os/IInstalld.aidl
+++ b/cmds/installd/binder/android/os/IInstalld.aidl
@@ -21,7 +21,7 @@
void createUserData(@nullable @utf8InCpp String uuid, int userId, int userSerial, int flags);
void destroyUserData(@nullable @utf8InCpp String uuid, int userId, int flags);
- void createAppData(in @nullable @utf8InCpp String uuid, in @utf8InCpp String packageName,
+ void createAppData(@nullable @utf8InCpp String uuid, in @utf8InCpp String packageName,
int userId, int flags, int appId, in @utf8InCpp String seInfo, int targetSdkVersion);
void restoreconAppData(@nullable @utf8InCpp String uuid, @utf8InCpp String packageName,
int userId, int flags, int appId, @utf8InCpp String seInfo);
diff --git a/cmds/installd/globals.h b/cmds/installd/globals.h
index fc502c0..8242eec 100644
--- a/cmds/installd/globals.h
+++ b/cmds/installd/globals.h
@@ -18,9 +18,10 @@
#ifndef GLOBALS_H_
#define GLOBALS_H_
-#include <commands.h>
#include <inttypes.h>
+#include "InstalldNativeService.h"
+
namespace android {
namespace installd {
diff --git a/cmds/installd/installd.cpp b/cmds/installd/installd.cpp
index ab49ebe..6c49aa3 100644
--- a/cmds/installd/installd.cpp
+++ b/cmds/installd/installd.cpp
@@ -28,11 +28,11 @@
#include <cutils/properties.h>
#include <private/android_filesystem_config.h>
-#include <commands.h>
-#include <globals.h>
-#include <installd_constants.h>
-#include <installd_deps.h> // Need to fill in requirements of commands.
-#include <utils.h>
+#include "InstalldNativeService.h"
+#include "globals.h"
+#include "installd_constants.h"
+#include "installd_deps.h" // Need to fill in requirements of commands.
+#include "utils.h"
#ifndef LOG_TAG
#define LOG_TAG "installd"
diff --git a/cmds/installd/installd_constants.h b/cmds/installd/installd_constants.h
index b0bcce9..401e581 100644
--- a/cmds/installd/installd_constants.h
+++ b/cmds/installd/installd_constants.h
@@ -42,7 +42,6 @@
constexpr int DEXOPT_DEBUGGABLE = 1 << 3;
constexpr int DEXOPT_BOOTCOMPLETE = 1 << 4;
constexpr int DEXOPT_PROFILE_GUIDED = 1 << 5;
-constexpr int DEXOPT_OTA = 1 << 6;
/* all known values for dexopt flags */
constexpr int DEXOPT_MASK =
@@ -50,8 +49,7 @@
| DEXOPT_SAFEMODE
| DEXOPT_DEBUGGABLE
| DEXOPT_BOOTCOMPLETE
- | DEXOPT_PROFILE_GUIDED
- | DEXOPT_OTA;
+ | DEXOPT_PROFILE_GUIDED;
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(*(a)))
diff --git a/cmds/installd/otapreopt.cpp b/cmds/installd/otapreopt.cpp
index 8a7a29f..d53018f 100644
--- a/cmds/installd/otapreopt.cpp
+++ b/cmds/installd/otapreopt.cpp
@@ -36,15 +36,14 @@
#include <cutils/properties.h>
#include <private/android_filesystem_config.h>
-#include <commands.h>
-#include <file_parsing.h>
-#include <globals.h>
-#include <installd_deps.h> // Need to fill in requirements of commands.
-#include <otapreopt_utils.h>
-#include <system_properties.h>
-#include <utils.h>
-
+#include "InstalldNativeService.h"
#include "dexopt.h"
+#include "file_parsing.h"
+#include "globals.h"
+#include "installd_deps.h" // Need to fill in requirements of commands.
+#include "otapreopt_utils.h"
+#include "system_properties.h"
+#include "utils.h"
#ifndef LOG_TAG
#define LOG_TAG "otapreopt"
diff --git a/cmds/installd/tests/installd_utils_test.cpp b/cmds/installd/tests/installd_utils_test.cpp
index 9b2de88..947cc0d 100644
--- a/cmds/installd/tests/installd_utils_test.cpp
+++ b/cmds/installd/tests/installd_utils_test.cpp
@@ -19,9 +19,9 @@
#include <gtest/gtest.h>
-#include <commands.h>
-#include <globals.h>
-#include <utils.h>
+#include "InstalldNativeService.h"
+#include "globals.h"
+#include "utils.h"
#undef LOG_TAG
#define LOG_TAG "utils_test"