Merge changes from topics "b194781951-flags", "b194781951-flags-5", "b194781951-flags-6", "b194781951-flags-7" into sc-v2-dev am: f4f7b2234e

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15550597

Change-Id: I93f2124203f7a38d3f93d15633a88a0da4dbb8bf
This commit is contained in:
Dave Mankoff
2021-09-10 19:40:54 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 28 deletions
@@ -1,24 +0,0 @@
/*
* Copyright (C) 2018 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.launcher3.uioverrides.plugins;
import com.android.launcher3.Utilities;
import com.android.systemui.shared.plugins.PluginInitializer;
public class PluginInitializerImpl implements PluginInitializer {
public boolean isDebuggable() {
return Utilities.IS_DEBUG_DEVICE;
}
}
@@ -24,6 +24,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import com.android.launcher3.Utilities;
import com.android.launcher3.util.MainThreadInitializedObject;
import com.android.systemui.plugins.Plugin;
import com.android.systemui.plugins.PluginListener;
@@ -53,20 +54,19 @@ public class PluginManagerWrapper {
private PluginManagerWrapper(Context c) {
mContext = c;
PluginInitializerImpl pluginInitializer = new PluginInitializerImpl();
mPluginEnabler = new PluginEnablerImpl(c);
List<String> privilegedPlugins = Collections.emptyList();
PluginInstance.Factory instanceFactory = new PluginInstance.Factory(
getClass().getClassLoader(), new PluginInstance.InstanceFactory<>(),
new PluginInstance.VersionChecker(), privilegedPlugins,
pluginInitializer.isDebuggable());
Utilities.IS_DEBUG_DEVICE);
PluginActionManager.Factory instanceManagerFactory = new PluginActionManager.Factory(
c, c.getPackageManager(), c.getMainExecutor(), MODEL_EXECUTOR, pluginInitializer,
c, c.getPackageManager(), c.getMainExecutor(), MODEL_EXECUTOR,
c.getSystemService(NotificationManager.class), mPluginEnabler,
privilegedPlugins, instanceFactory);
mPluginManager = new PluginManagerImpl(c, instanceManagerFactory,
pluginInitializer.isDebuggable(),
Utilities.IS_DEBUG_DEVICE,
Optional.ofNullable(Thread.getDefaultUncaughtExceptionHandler()), mPluginEnabler,
new PluginPrefs(c), privilegedPlugins);
}