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

Commit 735a3f90 authored by Kenny Guy's avatar Kenny Guy
Browse files

Revert "Add foreground profile changed to user switch observer."

This reverts commit 99b9030a.

Change-Id: If152904f298ecd9e6fd5d038797d061a5c85eec8
parent 99b9030a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -22,5 +22,4 @@ import android.os.IRemoteCallback;
oneway interface IUserSwitchObserver {
    void onUserSwitching(int newUserId, IRemoteCallback reply);
    void onUserSwitchComplete(int newUserId);
    void onForegroundProfileSwitch(int newProfileId);
}
+0 −4
Original line number Diff line number Diff line
@@ -722,10 +722,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
                                    newUserId, 0));
                            mSwitchingUser = false;
                        }
                        @Override
                        public void onForegroundProfileSwitch(int newProfileId) {
                            // Ignore.
                        }
                    });
        } catch (RemoteException e) {
            // TODO Auto-generated catch block
+0 −5
Original line number Diff line number Diff line
@@ -796,11 +796,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
                        @Override
                        public void onUserSwitchComplete(int newUserId) throws RemoteException {
                        }

                        @Override
                        public void onForegroundProfileSwitch(int newProfileId) {
                            // Ignore.
                        }
                    });
            userId = ActivityManagerNative.getDefault().getCurrentUser().id;
        } catch (RemoteException e) {
+0 −5
Original line number Diff line number Diff line
@@ -116,11 +116,6 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
                        @Override
                        public void onUserSwitchComplete(int newUserId) throws RemoteException {
                        }

                        @Override
                        public void onForegroundProfileSwitch(int newProfileId) {
                            // Ignore.
                        }
                    });
            userId = ActivityManagerNative.getDefault().getCurrentUser().id;
        } catch (RemoteException e) {
+0 −21
Original line number Diff line number Diff line
@@ -1277,7 +1277,6 @@ public final class ActivityManagerService extends ActivityManagerNative
    static final int NOTIFY_CLEARTEXT_NETWORK_MSG = 50;
    static final int POST_DUMP_HEAP_NOTIFICATION_MSG = 51;
    static final int DELETE_DUMPHEAP_MSG = 52;
    static final int FOREGROUND_PROFILE_CHANGED_MSG = 53;
    static final int FIRST_ACTIVITY_STACK_MSG = 100;
    static final int FIRST_BROADCAST_QUEUE_MSG = 200;
@@ -1916,9 +1915,6 @@ public final class ActivityManagerService extends ActivityManagerNative
                    mMemWatchDumpUid = -1;
                }
            } break;
            case FOREGROUND_PROFILE_CHANGED_MSG: {
                dispatchForegroundProfileChanged(msg.arg1);
            } break;
            }
        }
    };
@@ -2513,11 +2509,6 @@ public final class ActivityManagerService extends ActivityManagerNative
                mWindowManager.setFocusedApp(r.appToken, true);
            }
            applyUpdateLockStateLocked(r);
            if (last != null && last.userId != mFocusedActivity.userId) {
                mHandler.removeMessages(FOREGROUND_PROFILE_CHANGED_MSG);
                mHandler.sendMessage(mHandler.obtainMessage(FOREGROUND_PROFILE_CHANGED_MSG,
                                mFocusedActivity.userId, 0));
            }
        }
        EventLog.writeEvent(EventLogTags.AM_FOCUSED_ACTIVITY, mCurrentUserId,
                mFocusedActivity == null ? "NULL" : mFocusedActivity.shortComponentName);
@@ -19041,18 +19032,6 @@ public final class ActivityManagerService extends ActivityManagerNative
        return true;
    }
    void dispatchForegroundProfileChanged(int userId) {
        final int N = mUserSwitchObservers.beginBroadcast();
        for (int i = 0; i < N; i++) {
            try {
                mUserSwitchObservers.getBroadcastItem(i).onForegroundProfileSwitch(userId);
            } catch (RemoteException e) {
                // Ignore
            }
        }
        mUserSwitchObservers.finishBroadcast();
    }
    void sendUserSwitchBroadcastsLocked(int oldUserId, int newUserId) {
        long ident = Binder.clearCallingIdentity();
        try {
Loading