summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/compat/LauncherAppsCompatVQ.java
diff options
context:
space:
mode:
authorJon Miranda <jonmiranda@google.com>2019-05-10 13:31:51 -0700
committerJon Miranda <jonmiranda@google.com>2019-05-13 10:52:26 -0700
commitc2e54bc2104655c448e4e8de44c42a9382f59c70 (patch)
tree8ce19b637b81e18f7e3bf9542bc282782a24216d /src/com/android/launcher3/compat/LauncherAppsCompatVQ.java
parent763a7bffa32ac95bc1f82bf6bd591627c3c73f53 (diff)
downloadandroid_packages_apps_Trebuchet-c2e54bc2104655c448e4e8de44c42a9382f59c70.tar.gz
android_packages_apps_Trebuchet-c2e54bc2104655c448e4e8de44c42a9382f59c70.tar.bz2
android_packages_apps_Trebuchet-c2e54bc2104655c448e4e8de44c42a9382f59c70.zip
Use LauncherApps#getAllPackageInstallerSessions to get all sessions.
This new API allows us to get the package installer sessions for the main user as well as the managed profile, which will allow us to restore work profile items on the workspace. Bug: 131315856 Change-Id: Id76e815a76d1c715bc160776fd87d75bba92ff93
Diffstat (limited to 'src/com/android/launcher3/compat/LauncherAppsCompatVQ.java')
-rw-r--r--src/com/android/launcher3/compat/LauncherAppsCompatVQ.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/com/android/launcher3/compat/LauncherAppsCompatVQ.java b/src/com/android/launcher3/compat/LauncherAppsCompatVQ.java
new file mode 100644
index 000000000..0a1811e34
--- /dev/null
+++ b/src/com/android/launcher3/compat/LauncherAppsCompatVQ.java
@@ -0,0 +1,36 @@
+/*
+ * 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.Intent;
+import android.content.pm.PackageInstaller;
+
+import java.util.List;
+
+@TargetApi(29)
+public class LauncherAppsCompatVQ extends LauncherAppsCompatVO {
+
+ LauncherAppsCompatVQ(Context context) {
+ super(context);
+ }
+
+ public List<PackageInstaller.SessionInfo> getAllPackageInstallerSessions() {
+ return mLauncherApps.getAllPackageInstallerSessions();
+ }
+}