Loading core/java/android/content/pm/IPackageManager.aidl +0 −6 Original line number Diff line number Diff line Loading @@ -598,12 +598,6 @@ interface IPackageManager { void forceDexOpt(String packageName); /** * Execute the background dexopt job immediately on packages in packageNames. * If null, then execute on all packages. */ boolean runBackgroundDexoptJob(in List<String> packageNames); /** * Reconcile the information we have about the secondary dex files belonging to * {@code packagName} and the actual dex files. For all dex files that were Loading core/res/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -6311,7 +6311,7 @@ android:permission="android.permission.BIND_JOB_SERVICE" > </service> <service android:name="com.android.server.pm.BackgroundDexOptService" <service android:name="com.android.server.pm.BackgroundDexOptJobService" android:exported="true" android:permission="android.permission.BIND_JOB_SERVICE"> </service> Loading services/core/java/com/android/server/pm/BackgroundDexOptJobService.java 0 → 100644 +37 −0 Original line number Diff line number Diff line /* * Copyright (C) 2021 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 com.android.server.pm; import android.app.job.JobParameters; import android.app.job.JobService; /** * JobService to run background dex optimization. This is a thin wrapper and most logic exits in * {@link BackgroundDexOptService}. */ public final class BackgroundDexOptJobService extends JobService { @Override public boolean onStartJob(JobParameters params) { return BackgroundDexOptService.getService().onStartJob(this, params); } @Override public boolean onStopJob(JobParameters params) { return BackgroundDexOptService.getService().onStopJob(this, params); } } services/core/java/com/android/server/pm/BackgroundDexOptService.java +617 −357 File changed.Preview size limit exceeded, changes collapsed. Show changes services/core/java/com/android/server/pm/ComputerEngine.java +6 −0 Original line number Diff line number Diff line Loading @@ -179,6 +179,7 @@ public class ComputerEngine implements Computer { private final PackageDexOptimizer mPackageDexOptimizer; private final DexManager mDexManager; private final CompilerStats mCompilerStats; private final BackgroundDexOptService mBackgroundDexOptService; // PackageManagerService attributes that are primitives are referenced through the // pms object directly. Primitives are the only attributes so referenced. Loading Loading @@ -228,6 +229,7 @@ public class ComputerEngine implements Computer { mPackageDexOptimizer = args.service.mPackageDexOptimizer; mDexManager = args.service.getDexManager(); mCompilerStats = args.service.mCompilerStats; mBackgroundDexOptService = args.service.mBackgroundDexOptService; // Used to reference PMS attributes that are primitives and which are not // updated under control of the PMS lock. Loading Loading @@ -2929,6 +2931,10 @@ public class ComputerEngine implements Computer { mDexManager.getPackageUseInfoOrDefault(pkgName)); ipw.decreaseIndent(); } ipw.println("BgDexopt state:"); ipw.increaseIndent(); mBackgroundDexOptService.dump(ipw); ipw.decreaseIndent(); break; } Loading Loading
core/java/android/content/pm/IPackageManager.aidl +0 −6 Original line number Diff line number Diff line Loading @@ -598,12 +598,6 @@ interface IPackageManager { void forceDexOpt(String packageName); /** * Execute the background dexopt job immediately on packages in packageNames. * If null, then execute on all packages. */ boolean runBackgroundDexoptJob(in List<String> packageNames); /** * Reconcile the information we have about the secondary dex files belonging to * {@code packagName} and the actual dex files. For all dex files that were Loading
core/res/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -6311,7 +6311,7 @@ android:permission="android.permission.BIND_JOB_SERVICE" > </service> <service android:name="com.android.server.pm.BackgroundDexOptService" <service android:name="com.android.server.pm.BackgroundDexOptJobService" android:exported="true" android:permission="android.permission.BIND_JOB_SERVICE"> </service> Loading
services/core/java/com/android/server/pm/BackgroundDexOptJobService.java 0 → 100644 +37 −0 Original line number Diff line number Diff line /* * Copyright (C) 2021 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 com.android.server.pm; import android.app.job.JobParameters; import android.app.job.JobService; /** * JobService to run background dex optimization. This is a thin wrapper and most logic exits in * {@link BackgroundDexOptService}. */ public final class BackgroundDexOptJobService extends JobService { @Override public boolean onStartJob(JobParameters params) { return BackgroundDexOptService.getService().onStartJob(this, params); } @Override public boolean onStopJob(JobParameters params) { return BackgroundDexOptService.getService().onStopJob(this, params); } }
services/core/java/com/android/server/pm/BackgroundDexOptService.java +617 −357 File changed.Preview size limit exceeded, changes collapsed. Show changes
services/core/java/com/android/server/pm/ComputerEngine.java +6 −0 Original line number Diff line number Diff line Loading @@ -179,6 +179,7 @@ public class ComputerEngine implements Computer { private final PackageDexOptimizer mPackageDexOptimizer; private final DexManager mDexManager; private final CompilerStats mCompilerStats; private final BackgroundDexOptService mBackgroundDexOptService; // PackageManagerService attributes that are primitives are referenced through the // pms object directly. Primitives are the only attributes so referenced. Loading Loading @@ -228,6 +229,7 @@ public class ComputerEngine implements Computer { mPackageDexOptimizer = args.service.mPackageDexOptimizer; mDexManager = args.service.getDexManager(); mCompilerStats = args.service.mCompilerStats; mBackgroundDexOptService = args.service.mBackgroundDexOptService; // Used to reference PMS attributes that are primitives and which are not // updated under control of the PMS lock. Loading Loading @@ -2929,6 +2931,10 @@ public class ComputerEngine implements Computer { mDexManager.getPackageUseInfoOrDefault(pkgName)); ipw.decreaseIndent(); } ipw.println("BgDexopt state:"); ipw.increaseIndent(); mBackgroundDexOptService.dump(ipw); ipw.decreaseIndent(); break; } Loading