Loading Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -911,6 +911,7 @@ cc_library { filegroup { name: "incremental_aidl", srcs: [ "core/java/android/os/incremental/IIncrementalServiceConnector.aidl", "core/java/android/os/incremental/IncrementalFileSystemControlParcel.aidl", ], path: "core/java", Loading core/java/android/content/pm/FileSystemControlParcel.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.content.pm; import android.content.pm.IPackageInstallerSessionFileSystemConnector; import android.os.incremental.IIncrementalServiceConnector; import android.os.incremental.IncrementalFileSystemControlParcel; /** Loading @@ -26,6 +27,8 @@ import android.os.incremental.IncrementalFileSystemControlParcel; parcelable FileSystemControlParcel { // Incremental FS control descriptors. @nullable IncrementalFileSystemControlParcel incremental; // Incremental FS service. @nullable IIncrementalServiceConnector service; // Callback-based installation connector. @nullable IPackageInstallerSessionFileSystemConnector callback; } core/java/android/os/incremental/IIncrementalService.aidl +0 −7 Original line number Diff line number Diff line Loading @@ -37,13 +37,6 @@ interface IIncrementalService { int createStorage(in @utf8InCpp String path, in DataLoaderParamsParcel params, in IDataLoaderStatusListener listener, int createMode); int createLinkedStorage(in @utf8InCpp String path, int otherStorageId, int createMode); /** * Changes storage params. Returns 0 on success, and -errno on failure. * Use enableReadLogs to switch pages read logs reporting on and off. * Returns 0 on success, and - errno on failure: permission check or remount. */ int setStorageParams(int storageId, boolean enableReadLogs); /** * Bind-mounts a path under a storage to a full path. Can be permanent or temporary. */ Loading core/java/android/os/incremental/IIncrementalServiceConnector.aidl 0 → 100644 +27 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 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. */ package android.os.incremental; /** @hide */ interface IIncrementalServiceConnector { /** * Changes storage params. Returns 0 on success, and -errno on failure. * Use enableReadLogs to switch pages read logs reporting on and off. * Returns 0 on success, and - errno on failure: permission check or remount. */ int setStorageParams(boolean enableReadLogs); } core/java/android/os/incremental/IncrementalManager.java +0 −19 Original line number Diff line number Diff line Loading @@ -19,13 +19,11 @@ package android.os.incremental; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.annotation.SystemService; import android.content.Context; import android.content.pm.DataLoaderParams; import android.content.pm.IDataLoaderStatusListener; import android.os.RemoteException; import android.system.ErrnoException; import android.util.SparseArray; import com.android.internal.annotations.GuardedBy; Loading Loading @@ -321,23 +319,6 @@ public final class IncrementalManager { return nativeUnsafeGetFileSignature(path); } /** * Sets storage parameters. * * @param enableReadLogs - enables or disables read logs. Caller has to have a permission. */ @RequiresPermission(android.Manifest.permission.LOADER_USAGE_STATS) public void setStorageParams(int storageId, boolean enableReadLogs) throws ErrnoException { try { int res = mService.setStorageParams(storageId, enableReadLogs); if (res < 0) { throw new ErrnoException("setStorageParams", -res); } } catch (RemoteException e) { e.rethrowFromSystemServer(); } } /* Native methods */ private static native boolean nativeIsEnabled(); private static native boolean nativeIsIncrementalPath(@NonNull String path); Loading Loading
Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -911,6 +911,7 @@ cc_library { filegroup { name: "incremental_aidl", srcs: [ "core/java/android/os/incremental/IIncrementalServiceConnector.aidl", "core/java/android/os/incremental/IncrementalFileSystemControlParcel.aidl", ], path: "core/java", Loading
core/java/android/content/pm/FileSystemControlParcel.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.content.pm; import android.content.pm.IPackageInstallerSessionFileSystemConnector; import android.os.incremental.IIncrementalServiceConnector; import android.os.incremental.IncrementalFileSystemControlParcel; /** Loading @@ -26,6 +27,8 @@ import android.os.incremental.IncrementalFileSystemControlParcel; parcelable FileSystemControlParcel { // Incremental FS control descriptors. @nullable IncrementalFileSystemControlParcel incremental; // Incremental FS service. @nullable IIncrementalServiceConnector service; // Callback-based installation connector. @nullable IPackageInstallerSessionFileSystemConnector callback; }
core/java/android/os/incremental/IIncrementalService.aidl +0 −7 Original line number Diff line number Diff line Loading @@ -37,13 +37,6 @@ interface IIncrementalService { int createStorage(in @utf8InCpp String path, in DataLoaderParamsParcel params, in IDataLoaderStatusListener listener, int createMode); int createLinkedStorage(in @utf8InCpp String path, int otherStorageId, int createMode); /** * Changes storage params. Returns 0 on success, and -errno on failure. * Use enableReadLogs to switch pages read logs reporting on and off. * Returns 0 on success, and - errno on failure: permission check or remount. */ int setStorageParams(int storageId, boolean enableReadLogs); /** * Bind-mounts a path under a storage to a full path. Can be permanent or temporary. */ Loading
core/java/android/os/incremental/IIncrementalServiceConnector.aidl 0 → 100644 +27 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 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. */ package android.os.incremental; /** @hide */ interface IIncrementalServiceConnector { /** * Changes storage params. Returns 0 on success, and -errno on failure. * Use enableReadLogs to switch pages read logs reporting on and off. * Returns 0 on success, and - errno on failure: permission check or remount. */ int setStorageParams(boolean enableReadLogs); }
core/java/android/os/incremental/IncrementalManager.java +0 −19 Original line number Diff line number Diff line Loading @@ -19,13 +19,11 @@ package android.os.incremental; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.annotation.SystemService; import android.content.Context; import android.content.pm.DataLoaderParams; import android.content.pm.IDataLoaderStatusListener; import android.os.RemoteException; import android.system.ErrnoException; import android.util.SparseArray; import com.android.internal.annotations.GuardedBy; Loading Loading @@ -321,23 +319,6 @@ public final class IncrementalManager { return nativeUnsafeGetFileSignature(path); } /** * Sets storage parameters. * * @param enableReadLogs - enables or disables read logs. Caller has to have a permission. */ @RequiresPermission(android.Manifest.permission.LOADER_USAGE_STATS) public void setStorageParams(int storageId, boolean enableReadLogs) throws ErrnoException { try { int res = mService.setStorageParams(storageId, enableReadLogs); if (res < 0) { throw new ErrnoException("setStorageParams", -res); } } catch (RemoteException e) { e.rethrowFromSystemServer(); } } /* Native methods */ private static native boolean nativeIsEnabled(); private static native boolean nativeIsIncrementalPath(@NonNull String path); Loading