Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2dbcf097 authored by Winson Chung's avatar Winson Chung
Browse files

Moving SysUI with legacy Recents to another build target



- Move all legacy recents code out of the core sysui code
- Add separate target for products which still depend on it
- Move overview proxy implementation into another implementation of the
  recents interface

Test: atest SystemUITests
Test: Push SystemUiWithLegacyRecents to the system image
      adb shell pm disable com.google.android.apps.nexuslauncher/com.android.quickstep.TouchInteractionService
      and ensure that the old recents implementation still works (and split
      screen)

Change-Id: Iad67218ec37c13c79b6393d87f6bdc4f3996e2c6
Signed-off-by: default avatarWinson Chung <winsonc@google.com>
parent f95d6a17
Loading
Loading
Loading
Loading
+40 −0
Original line number Diff line number Diff line
@@ -156,3 +156,43 @@ android_app {
    ],

}

// Only used for products that are shipping legacy Recents
android_app {
    name: "SystemUIWithLegacyRecents",
    overrides: [
        "SystemUI",
    ],

    platform_apis: true,
    certificate: "platform",
    privileged: true,

    dxflags: ["--multi-dex"],
    aaptflags: [
        "--extra-packages",
        "com.android.keyguard",
    ],
    optimize: {
        proguard_flags_files: ["proguard.flags", "legacy/recents/proguard.flags"],
    },

    static_libs: [
        "SystemUI-core",
    ],
    libs: [
        "telephony-common",
        "android.car",
        "android.car.user",
    ],

    srcs: [
        "legacy/recents/src/**/*.java",
        "legacy/recents/src/**/I*.aidl",
    ],
    resource_dirs: [
        "legacy/recents/res",
    ],

    manifest: "legacy/recents/AndroidManifest.xml",
}
+4 −28
Original line number Diff line number Diff line
@@ -128,9 +128,6 @@
    <!-- Needed for WallpaperManager.clear in ImageWallpaper.updateWallpaperLocked -->
    <uses-permission android:name="android.permission.SET_WALLPAPER"/>

    <!-- Recents -->
    <uses-permission android:name="android.permission.BIND_APPWIDGET" />

    <!-- Wifi Display -->
    <uses-permission android:name="android.permission.CONFIGURE_WIFI_DISPLAY" />

@@ -247,14 +244,14 @@
            android:exported="true"
        />

        <!-- Recents depends on every user having their own SystemUI process, so on user switch,
             ensure that the process is created by starting this service.
        <!-- On user switch, this service is started to ensure that the associated SystemUI
             process for the current user is started. See the resource
             "config_systemUIServiceComponentsPerUser".
             -->
        <service android:name="SystemUISecondaryUserService"
            android:exported="true"
            android:exported="false"
            android:permission="com.android.systemui.permission.SELF" />


        <!-- started from PhoneWindowManager
             TODO: Should have an android:permission attribute -->
        <service android:name=".screenshot.TakeScreenshotService"
@@ -313,27 +310,6 @@
            </intent-filter>
        </activity-alias>

        <!-- Service used by secondary users to register themselves with the system user. -->
        <service android:name=".recents.RecentsSystemUserService"
            android:exported="false"
            android:permission="com.android.systemui.permission.SELF" />

        <!-- Alternate Recents -->
        <activity android:name=".recents.RecentsActivity"
                  android:label="@string/accessibility_desc_recent_apps"
                  android:exported="false"
                  android:launchMode="singleInstance"
                  android:excludeFromRecents="true"
                  android:stateNotNeeded="true"
                  android:resumeWhilePausing="true"
                  android:resizeableActivity="true"
                  android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden"
                  android:theme="@style/RecentsTheme.Wallpaper">
            <intent-filter>
                <action android:name="com.android.systemui.recents.TOGGLE_RECENTS" />
            </intent-filter>
        </activity>

        <activity
            android:name=".stackdivider.ForcedResizableInfoActivity"
            android:theme="@style/ForcedResizableTheme"
+51 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
 * Copyright (c) 2018 Google Inc.
 *
 * 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.
 */
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
          xmlns:tools="http://schemas.android.com/tools"
          package="com.android.systemui"
          android:sharedUserId="android.uid.systemui"
          coreApp="true">

    <application
        android:name="com.android.systemui.SystemUIApplication">

        <!-- Service used by secondary users to register themselves with the system user. -->
        <service android:name=".recents.RecentsSystemUserService"
            android:exported="false"
            android:permission="com.android.systemui.permission.SELF" />

        <!-- Alternate Recents -->
        <activity android:name=".recents.RecentsActivity"
                  android:label="@string/accessibility_desc_recent_apps"
                  android:exported="false"
                  android:launchMode="singleInstance"
                  android:excludeFromRecents="true"
                  android:stateNotNeeded="true"
                  android:resumeWhilePausing="true"
                  android:resizeableActivity="true"
                  android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden"
                  android:theme="@style/RecentsTheme.Wallpaper">
            <intent-filter>
                <action android:name="com.android.systemui.recents.TOGGLE_RECENTS" />
            </intent-filter>
        </activity>

    </application>
</manifest>
+14 −0
Original line number Diff line number Diff line
-keepclassmembers class ** {
    public void onBusEvent(**);
    public void onInterprocessBusEvent(**);
}
-keepclassmembers class ** extends **.EventBus$InterprocessEvent {
    public <init>(android.os.Bundle);
}

-keep class com.android.systemui.recents.views.TaskView {
    public int getDim();
    public void setDim(int);
    public float getTaskProgress();
    public void setTaskProgress(float);
}
 No newline at end of file
Loading