Files
Lawnchair/src/com/android/launcher3/compat/LauncherAppsCompatVQ.java
T
Jon Miranda 7c76a33243 Add support for work profile promise icons.
- We were not getting callbacks for sessions created under work profile.
- We did not pass in the user when creating the workspace item infos.
- Added check for if app is installed before adding item to workspace
  to prevent any stale promise icons. This seems to happen when uninstalling
  and then immediately reinstalling an application.

Bug: 141556707
Change-Id: Ie0320f3ede70b6c7543cb60c3b95a2fe398eecb5
Merged-In: I2db2d8da449c37eb248a59fbc9e7b517f50855c1
2019-10-24 23:07:04 +00:00

49 lines
1.6 KiB
Java

/*
* 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 com.android.launcher3.compat;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.pm.PackageInstaller;
import android.content.pm.PackageInstaller.SessionCallback;
import com.android.launcher3.util.LooperExecutor;
import java.util.List;
@TargetApi(29)
public class LauncherAppsCompatVQ extends LauncherAppsCompatVO {
LauncherAppsCompatVQ(Context context) {
super(context);
}
public List<PackageInstaller.SessionInfo> getAllPackageInstallerSessions() {
return mLauncherApps.getAllPackageInstallerSessions();
}
@Override
public void registerSessionCallback(LooperExecutor executor, SessionCallback sessionCallback) {
mLauncherApps.registerPackageInstallerSessionCallback(executor, sessionCallback);
}
@Override
public void unregisterSessionCallback(SessionCallback sessionCallback) {
mLauncherApps.unregisterPackageInstallerSessionCallback(sessionCallback);
}
}