Merge "Reformat Android.bp file"
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index 8258c45..98ad138 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -1585,6 +1585,7 @@
             is_remote_mode = 1;
             do_fb = 0;
         } else if (ds.extra_options_ == "bugreportwear") {
+            do_start_service = true;
             ds.update_progress_ = true;
         } else if (ds.extra_options_ == "bugreporttelephony") {
             telephony_only = true;
diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp
index ffdd327..68acc69 100644
--- a/cmds/installd/InstalldNativeService.cpp
+++ b/cmds/installd/InstalldNativeService.cpp
@@ -103,6 +103,7 @@
 }
 
 static binder::Status exception(uint32_t code, const std::string& msg) {
+    LOG(ERROR) << msg << " (" << code << ")";
     return binder::Status::fromExceptionCode(code, String8(msg.c_str()));
 }
 
diff --git a/cmds/installd/tests/installd_dexopt_test.cpp b/cmds/installd/tests/installd_dexopt_test.cpp
index 2629144..d640558 100644
--- a/cmds/installd/tests/installd_dexopt_test.cpp
+++ b/cmds/installd/tests/installd_dexopt_test.cpp
@@ -282,7 +282,7 @@
                                                  profile_name_ptr,
                                                  dm_path_ptr,
                                                  compilation_reason_ptr);
-        ASSERT_EQ(should_binder_call_succeed, result.isOk());
+        ASSERT_EQ(should_binder_call_succeed, result.isOk()) << result.toString8().c_str();
         int expected_access = should_dex_be_compiled ? 0 : -1;
         std::string odex = GetSecondaryDexArtifact(path, "odex");
         std::string vdex = GetSecondaryDexArtifact(path, "vdex");
@@ -310,7 +310,7 @@
             storage_flag,
             &out_secondary_dex_exists);
 
-        ASSERT_EQ(should_binder_call_succeed, result.isOk());
+        ASSERT_EQ(should_binder_call_succeed, result.isOk()) << result.toString8().c_str();
         ASSERT_EQ(should_dex_exist, out_secondary_dex_exists);
 
         int expected_access = should_dex_be_deleted ? -1 : 0;
@@ -375,10 +375,10 @@
 
         bool prof_result;
         binder::Status prof_binder_result = service_->prepareAppProfile(
-                package_name_, kTestUserId, kTestAppId, *profile_name_ptr, /*code path*/ "base.apk",
+                package_name_, kTestUserId, kTestAppId, *profile_name_ptr, apk_path_,
                 /*dex_metadata*/ nullptr, &prof_result);
 
-        ASSERT_TRUE(prof_binder_result.isOk());
+        ASSERT_TRUE(prof_binder_result.isOk()) << prof_binder_result.toString8().c_str();
         ASSERT_TRUE(prof_result);
 
         binder::Status result = service_->dexopt(apk_path_,
@@ -397,7 +397,7 @@
                                                  profile_name_ptr,
                                                  dm_path_ptr,
                                                  compilation_reason_ptr);
-        ASSERT_EQ(should_binder_call_succeed, result.isOk());
+        ASSERT_EQ(should_binder_call_succeed, result.isOk()) << result.toString8().c_str();
 
         if (!should_binder_call_succeed) {
             return;
@@ -662,7 +662,7 @@
         bool result;
         binder::Status binder_result = service_->createProfileSnapshot(
                 appid, package_name, kPrimaryProfile, apk_path_, &result);
-        ASSERT_TRUE(binder_result.isOk());
+        ASSERT_TRUE(binder_result.isOk()) << binder_result.toString8().c_str();
         ASSERT_EQ(expected_result, result);
 
         if (!expected_result) {
@@ -704,7 +704,7 @@
         bool result;
         binder::Status binder_result = service_->mergeProfiles(
                 kTestAppUid, package_name, code_path, &result);
-        ASSERT_TRUE(binder_result.isOk());
+        ASSERT_TRUE(binder_result.isOk()) << binder_result.toString8().c_str();
         ASSERT_EQ(expected_result, result);
 
         if (!expected_result) {
@@ -731,9 +731,9 @@
             bool expected_result) {
         bool result;
         binder::Status binder_result = service_->prepareAppProfile(
-                package_name, kTestUserId, kTestAppId, profile_name, /*code path*/ "base.apk",
+                package_name, kTestUserId, kTestAppId, profile_name, apk_path_,
                 /*dex_metadata*/ nullptr, &result);
-        ASSERT_TRUE(binder_result.isOk());
+        ASSERT_TRUE(binder_result.isOk()) << binder_result.toString8().c_str();
         ASSERT_EQ(expected_result, result);
 
         if (!expected_result) {
@@ -820,7 +820,7 @@
     createProfileSnapshot(kTestAppId, package_name_, /*expected_result*/ true);
 
     binder::Status binder_result = service_->destroyProfileSnapshot(package_name_, kPrimaryProfile);
-    ASSERT_TRUE(binder_result.isOk());
+    ASSERT_TRUE(binder_result.isOk()) << binder_result.toString8().c_str();
     struct stat st;
     ASSERT_EQ(-1, stat(snap_profile_.c_str(), &st));
     ASSERT_EQ(ENOENT, errno);
diff --git a/cmds/surfacereplayer/proto/Android.bp b/cmds/surfacereplayer/proto/Android.bp
index 7b402fe..71a5e23 100644
--- a/cmds/surfacereplayer/proto/Android.bp
+++ b/cmds/surfacereplayer/proto/Android.bp
@@ -7,11 +7,6 @@
         "-Wall",
         "-Werror",
     ],
-    arch: {
-        arm: {
-            instruction_set: "arm",
-        },
-    },
     proto: {
         type: "lite",
         export_proto_headers: true,
diff --git a/libs/vr/libbufferhub/Android.bp b/libs/vr/libbufferhub/Android.bp
index a5b69e3..a2287e1 100644
--- a/libs/vr/libbufferhub/Android.bp
+++ b/libs/vr/libbufferhub/Android.bp
@@ -51,11 +51,6 @@
         "-Wall",
         "-Werror",
     ],
-    arch: {
-        arm: {
-            instruction_set: "arm",
-        },
-    },
     export_include_dirs: localIncludeFiles,
     static_libs: staticLibraries,
     shared_libs: sharedLibraries,
diff --git a/libs/vr/libbufferhubqueue/Android.bp b/libs/vr/libbufferhubqueue/Android.bp
index 04f527a..b279875 100644
--- a/libs/vr/libbufferhubqueue/Android.bp
+++ b/libs/vr/libbufferhubqueue/Android.bp
@@ -55,11 +55,6 @@
         "-Wno-unused-parameter",
         "-Wno-unused-variable",
     ],
-    arch: {
-        arm: {
-            instruction_set: "arm",
-        },
-    },
     srcs: sourceFiles,
     export_include_dirs: includeFiles,
     export_static_lib_headers: staticLibraries,
diff --git a/libs/vr/libdisplay/Android.bp b/libs/vr/libdisplay/Android.bp
index 6aefaaa..8213ca2 100644
--- a/libs/vr/libdisplay/Android.bp
+++ b/libs/vr/libdisplay/Android.bp
@@ -52,11 +52,6 @@
 cc_library {
     tags: ["tests"],
     srcs: sourceFiles,
-    arch: {
-        arm: {
-            instruction_set: "arm",
-        },
-    },
     cflags: ["-DLOG_TAG=\"libdisplay\"",
         "-DTRACE=0",
         "-DATRACE_TAG=ATRACE_TAG_GRAPHICS",
diff --git a/libs/vr/libpdx/Android.bp b/libs/vr/libpdx/Android.bp
index efd09a3..10c0b31 100644
--- a/libs/vr/libpdx/Android.bp
+++ b/libs/vr/libpdx/Android.bp
@@ -8,11 +8,6 @@
         "-DLOG_TAG=\"libpdx\"",
         "-DTRACE=0",
     ],
-    arch: {
-        arm: {
-            instruction_set: "arm",
-        },
-    },
     export_include_dirs: ["private"],
     local_include_dirs: ["private"],
     srcs: [
diff --git a/libs/vr/libpdx_uds/Android.bp b/libs/vr/libpdx_uds/Android.bp
index 5130f1c..d0b7cab 100644
--- a/libs/vr/libpdx_uds/Android.bp
+++ b/libs/vr/libpdx_uds/Android.bp
@@ -18,11 +18,6 @@
         "ipc_helper.cpp",
         "service_endpoint.cpp",
     ],
-    arch: {
-        arm: {
-            instruction_set: "arm",
-        },
-    },
     static_libs: [
         "libcutils",
         "libbase",
diff --git a/libs/vr/libperformance/Android.bp b/libs/vr/libperformance/Android.bp
index f169c79..6a46876 100644
--- a/libs/vr/libperformance/Android.bp
+++ b/libs/vr/libperformance/Android.bp
@@ -36,11 +36,6 @@
         "-Wall",
         "-Werror",
     ],
-    arch: {
-        arm: {
-            instruction_set: "arm",
-        },
-    },
     export_include_dirs: includeFiles,
     static_libs: staticLibraries,
     shared_libs: sharedLibraries,
diff --git a/libs/vr/libvr_manager/Android.bp b/libs/vr/libvr_manager/Android.bp
index 6060c6e..8784877 100644
--- a/libs/vr/libvr_manager/Android.bp
+++ b/libs/vr/libvr_manager/Android.bp
@@ -31,11 +31,6 @@
     include_dirs: include_dirs,
     export_include_dirs: exported_include_dirs,
     cflags: ["-Wall", "-Werror", "-Wunused", "-Wunreachable-code"],
-    arch: {
-        arm: {
-            instruction_set: "arm",
-        },
-    },
     static_libs: static_libs,
     name: "libvr_manager",
 }
diff --git a/libs/vr/libvrflinger/Android.bp b/libs/vr/libvrflinger/Android.bp
index 66ece14..4d80e91 100644
--- a/libs/vr/libvrflinger/Android.bp
+++ b/libs/vr/libvrflinger/Android.bp
@@ -82,11 +82,6 @@
         "-Wno-error=sign-compare", // to fix later
         "-Wno-unused-variable",
     ],
-    arch: {
-        arm: {
-            instruction_set: "arm",
-        },
-    },
     shared_libs: sharedLibraries,
     whole_static_libs: staticLibraries,
     header_libs: headerLibraries,