Untangle listeners mess in IncrementalService

Listeners and some binder call parameters were using several
different styles when passed around - copy, move, pointer,
pointer to pointer. This CL tries to 'normalize' that.

Bug: 183067554
Test: atest IncrementalServiceTest
Change-Id: Ia28089aa9e4491b0f28e3e747489199cfccb5a1b
diff --git a/services/incremental/BinderIncrementalService.cpp b/services/incremental/BinderIncrementalService.cpp
index 052b4dd..63488f9 100644
--- a/services/incremental/BinderIncrementalService.cpp
+++ b/services/incremental/BinderIncrementalService.cpp
@@ -118,9 +118,10 @@
 binder::Status BinderIncrementalService::createStorage(
         const ::std::string& path, const ::android::content::pm::DataLoaderParamsParcel& params,
         int32_t createMode, int32_t* _aidl_return) {
-    *_aidl_return = mImpl.createStorage(path, params,
-                                        android::incremental::IncrementalService::CreateOptions(
-                                                createMode));
+    *_aidl_return =
+            mImpl.createStorage(path, const_cast<content::pm::DataLoaderParamsParcel&&>(params),
+                                android::incremental::IncrementalService::CreateOptions(
+                                        createMode));
     return ok();
 }
 
@@ -144,9 +145,8 @@
         bool* _aidl_return) {
     *_aidl_return =
             mImpl.startLoading(storageId, const_cast<content::pm::DataLoaderParamsParcel&&>(params),
-                               statusListener,
-                               const_cast<StorageHealthCheckParams&&>(healthCheckParams),
-                               healthListener, perUidReadTimeouts);
+                               statusListener, healthCheckParams, healthListener,
+                               perUidReadTimeouts);
     return ok();
 }
 
@@ -334,10 +334,8 @@
         int32_t storageId,
         const ::android::os::incremental::StorageHealthCheckParams& healthCheckParams,
         const ::android::sp<IStorageHealthListener>& healthListener, bool* _aidl_return) {
-    *_aidl_return = mImpl.registerStorageHealthListener(storageId,
-                                                        const_cast<StorageHealthCheckParams&&>(
-                                                                healthCheckParams),
-                                                        healthListener);
+    *_aidl_return =
+            mImpl.registerStorageHealthListener(storageId, healthCheckParams, healthListener);
     return ok();
 }