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

Commit cb239e07 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Remove IApplicationToken

It doesn't expose any function for a long time. So it can be a
simple private inner class only for referencing ActivityRecord.

Bug: 163976519
Test: CtsActivityManagerDeviceTestCases
Change-Id: Id773ac3f0afea198ad4f8b4594d7a4cf0ad98ea8
parent b4c7284e
Loading
Loading
Loading
Loading
+0 −25
Original line number Diff line number Diff line
/* //device/java/android/android/view/IApplicationToken.aidl
**
** Copyright 2007, 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 android.view;

/** {@hide} */
interface IApplicationToken
{
  String getName();
}
+0 −1
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ import android.os.IRemoteCallback;
import android.os.ParcelFileDescriptor;
import android.view.DisplayCutout;
import android.view.DisplayInfo;
import android.view.IApplicationToken;
import android.view.IAppTransitionAnimationSpecsFuture;
import android.view.ICrossWindowBlurEnabledListener;
import android.view.IDisplayWindowInsetsController;
+2 −10
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVE
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
import static android.view.WindowManager.LayoutParams.TYPE_BOOT_PROGRESS;
import static android.view.WindowManager.LayoutParams.TYPE_DISPLAY_OVERLAY;
import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER;
@@ -78,7 +79,6 @@ import android.os.RemoteException;
import android.util.Slog;
import android.util.proto.ProtoOutputStream;
import android.view.Display;
import android.view.IApplicationToken;
import android.view.IDisplayFoldListener;
import android.view.IWindowManager;
import android.view.KeyEvent;
@@ -202,14 +202,6 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
         */
        public int getBaseType();

        /**
         * Return the token for the application (actually activity) that owns
         * this window.  May return null for system windows.
         *
         * @return An IApplicationToken identifying the owning activity.
         */
        public IApplicationToken getAppToken();

        /**
         * Return true if this window (or a window it is attached to, but not
         * considering its app token) is currently animating.
@@ -676,7 +668,7 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
     */
    default boolean canBeHiddenByKeyguardLw(WindowState win) {
        // Keyguard visibility of window from activities are determined over activity visibility.
        if (win.getAppToken() != null) {
        if (win.getBaseType() == TYPE_BASE_APPLICATION) {
            return false;
        }
        switch (win.getAttrs().type) {
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ public class ActivityAssistInfo {
    private final int mTaskId;

    public ActivityAssistInfo(ActivityRecord activityRecord) {
        this.mActivityToken = activityRecord.appToken;
        this.mActivityToken = activityRecord.token;
        this.mAssistToken = activityRecord.assistToken;
        this.mTaskId = activityRecord.getTask().mTaskId;
    }
+1 −1
Original line number Diff line number Diff line
@@ -558,7 +558,7 @@ class ActivityClientController extends IActivityClientController.Stub {
                final ActivityRecord below = ar.getTask().getActivity((r) -> !r.finishing,
                        ar, false /*includeBoundary*/, true /*traverseTopToBottom*/);
                if (below != null && below.getUid() == ar.getUid()) {
                    return below.appToken.asBinder();
                    return below.token;
                }
            }
        } finally {
Loading