Adding event log tags for tracking secondary user connections.
Bug: 27175589 Change-Id: I6025eb6b0cef0057fd006cc044a638c48b481ed7
This commit is contained in:
@@ -40,4 +40,15 @@ public class EventLogConstants {
|
|||||||
public static final int SYSUI_SHADE_GESTURE_SWIPE_DOWN_QS = 9;
|
public static final int SYSUI_SHADE_GESTURE_SWIPE_DOWN_QS = 9;
|
||||||
/** The user tapped on the status bar to open quick settings, from shade. */
|
/** The user tapped on the status bar to open quick settings, from shade. */
|
||||||
public static final int SYSUI_TAP_TO_OPEN_QS = 10;
|
public static final int SYSUI_TAP_TO_OPEN_QS = 10;
|
||||||
|
|
||||||
|
/** Secondary user tries binding to the system sysui service */
|
||||||
|
public static final int SYSUI_RECENTS_CONNECTION_USER_BIND_SERVICE = 1;
|
||||||
|
/** Secondary user is bound to the system sysui service */
|
||||||
|
public static final int SYSUI_RECENTS_CONNECTION_USER_SYSTEM_BOUND = 2;
|
||||||
|
/** Secondary user loses connection after system sysui has died */
|
||||||
|
public static final int SYSUI_RECENTS_CONNECTION_USER_SYSTEM_UNBOUND = 3;
|
||||||
|
/** System sysui registers secondary user's callbacks */
|
||||||
|
public static final int SYSUI_RECENTS_CONNECTION_SYSTEM_REGISTER_USER = 4;
|
||||||
|
/** System sysui unregisters secondary user's callbacks (after death) */
|
||||||
|
public static final int SYSUI_RECENTS_CONNECTION_SYSTEM_UNREGISTER_USER = 5;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,3 +51,13 @@ option java_package com.android.systemui;
|
|||||||
# SearchPanelView.java
|
# SearchPanelView.java
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
36050 sysui_searchpanel_touch (type|1),(x|1),(y|1)
|
36050 sysui_searchpanel_touch (type|1),(x|1),(y|1)
|
||||||
|
|
||||||
|
# ---------------------------
|
||||||
|
# Recents.java, RecentsSystemUser.java
|
||||||
|
# ---------------------------
|
||||||
|
## type: 1: USER_BIND_SERVICE Secondary user tries binding to the system sysui service
|
||||||
|
## 2: USER_SYSTEM_BOUND Secondary user is bound to the system sysui service
|
||||||
|
## 3: USER_SYSTEM_UNBOUND Secondary user loses connection after system sysui has died
|
||||||
|
## 4: SYSTEM_REGISTER_USER System sysui registers user's callbacks
|
||||||
|
## 5: SYSTEM_UNREGISTER_USER System sysui unregisters user's callbacks (after death)
|
||||||
|
36060 sysui_recents_connection (type|1),(user|1)
|
||||||
@@ -31,10 +31,13 @@ import android.os.RemoteException;
|
|||||||
import android.os.SystemProperties;
|
import android.os.SystemProperties;
|
||||||
import android.os.UserHandle;
|
import android.os.UserHandle;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
|
import android.util.EventLog;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Display;
|
import android.view.Display;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
|
import com.android.systemui.EventLogConstants;
|
||||||
|
import com.android.systemui.EventLogTags;
|
||||||
import com.android.systemui.RecentsComponent;
|
import com.android.systemui.RecentsComponent;
|
||||||
import com.android.systemui.SystemUI;
|
import com.android.systemui.SystemUI;
|
||||||
import com.android.systemui.recents.events.EventBus;
|
import com.android.systemui.recents.events.EventBus;
|
||||||
@@ -83,20 +86,23 @@ public class Recents extends SystemUI
|
|||||||
private int mDraggingInRecentsCurrentUser;
|
private int mDraggingInRecentsCurrentUser;
|
||||||
|
|
||||||
// Only For system user, this is the callbacks instance we return to each secondary user
|
// Only For system user, this is the callbacks instance we return to each secondary user
|
||||||
private RecentsSystemUser mSystemUserCallbacks;
|
private RecentsSystemUser mSystemToUserCallbacks;
|
||||||
|
|
||||||
// Only for secondary users, this is the callbacks instance provided by the system user to make
|
// Only for secondary users, this is the callbacks instance provided by the system user to make
|
||||||
// calls back
|
// calls back
|
||||||
private IRecentsSystemUserCallbacks mCallbacksToSystemUser;
|
private IRecentsSystemUserCallbacks mUserToSystemCallbacks;
|
||||||
|
|
||||||
// The set of runnables to run after binding to the system user's service.
|
// The set of runnables to run after binding to the system user's service.
|
||||||
private final ArrayList<Runnable> mOnConnectRunnables = new ArrayList<>();
|
private final ArrayList<Runnable> mOnConnectRunnables = new ArrayList<>();
|
||||||
|
|
||||||
// Only for secondary users, this is the death handler for the binder from the system user
|
// Only for secondary users, this is the death handler for the binder from the system user
|
||||||
private final IBinder.DeathRecipient mCallbacksToSystemUserDeathRcpt = new IBinder.DeathRecipient() {
|
private final IBinder.DeathRecipient mUserToSystemCallbacksDeathRcpt = new IBinder.DeathRecipient() {
|
||||||
@Override
|
@Override
|
||||||
public void binderDied() {
|
public void binderDied() {
|
||||||
mCallbacksToSystemUser = null;
|
mUserToSystemCallbacks = null;
|
||||||
|
EventLog.writeEvent(EventLogTags.SYSUI_RECENTS_CONNECTION,
|
||||||
|
EventLogConstants.SYSUI_RECENTS_CONNECTION_USER_SYSTEM_UNBOUND,
|
||||||
|
sSystemServicesProxy.getProcessUser());
|
||||||
|
|
||||||
// Retry after a fixed duration
|
// Retry after a fixed duration
|
||||||
mHandler.postDelayed(new Runnable() {
|
mHandler.postDelayed(new Runnable() {
|
||||||
@@ -109,16 +115,19 @@ public class Recents extends SystemUI
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Only for secondary users, this is the service connection we use to connect to the system user
|
// Only for secondary users, this is the service connection we use to connect to the system user
|
||||||
private final ServiceConnection mServiceConnectionToSystemUser = new ServiceConnection() {
|
private final ServiceConnection mUserToSystemServiceConnection = new ServiceConnection() {
|
||||||
@Override
|
@Override
|
||||||
public void onServiceConnected(ComponentName name, IBinder service) {
|
public void onServiceConnected(ComponentName name, IBinder service) {
|
||||||
if (service != null) {
|
if (service != null) {
|
||||||
mCallbacksToSystemUser = IRecentsSystemUserCallbacks.Stub.asInterface(
|
mUserToSystemCallbacks = IRecentsSystemUserCallbacks.Stub.asInterface(
|
||||||
service);
|
service);
|
||||||
|
EventLog.writeEvent(EventLogTags.SYSUI_RECENTS_CONNECTION,
|
||||||
|
EventLogConstants.SYSUI_RECENTS_CONNECTION_USER_SYSTEM_BOUND,
|
||||||
|
sSystemServicesProxy.getProcessUser());
|
||||||
|
|
||||||
// Listen for system user's death, so that we can reconnect later
|
// Listen for system user's death, so that we can reconnect later
|
||||||
try {
|
try {
|
||||||
service.linkToDeath(mCallbacksToSystemUserDeathRcpt, 0);
|
service.linkToDeath(mUserToSystemCallbacksDeathRcpt, 0);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Lost connection to (System) SystemUI", e);
|
Log.e(TAG, "Lost connection to (System) SystemUI", e);
|
||||||
}
|
}
|
||||||
@@ -142,7 +151,7 @@ public class Recents extends SystemUI
|
|||||||
* Returns the callbacks interface that non-system users can call.
|
* Returns the callbacks interface that non-system users can call.
|
||||||
*/
|
*/
|
||||||
public IBinder getSystemUserCallbacks() {
|
public IBinder getSystemUserCallbacks() {
|
||||||
return mSystemUserCallbacks;
|
return mSystemToUserCallbacks;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static RecentsTaskLoader getTaskLoader() {
|
public static RecentsTaskLoader getTaskLoader() {
|
||||||
@@ -190,7 +199,7 @@ public class Recents extends SystemUI
|
|||||||
if (sSystemServicesProxy.isSystemUser(processUser)) {
|
if (sSystemServicesProxy.isSystemUser(processUser)) {
|
||||||
// For the system user, initialize an instance of the interface that we can pass to the
|
// For the system user, initialize an instance of the interface that we can pass to the
|
||||||
// secondary user
|
// secondary user
|
||||||
mSystemUserCallbacks = new RecentsSystemUser(mContext, mImpl);
|
mSystemToUserCallbacks = new RecentsSystemUser(mContext, mImpl);
|
||||||
} else {
|
} else {
|
||||||
// For the secondary user, bind to the primary user's service to get a persistent
|
// For the secondary user, bind to the primary user's service to get a persistent
|
||||||
// interface to register its implementation and to later update its state
|
// interface to register its implementation and to later update its state
|
||||||
@@ -224,9 +233,9 @@ public class Recents extends SystemUI
|
|||||||
mImpl.showRecents(triggeredFromAltTab, false /* draggingInRecents */,
|
mImpl.showRecents(triggeredFromAltTab, false /* draggingInRecents */,
|
||||||
true /* animate */, false /* reloadTasks */);
|
true /* animate */, false /* reloadTasks */);
|
||||||
} else {
|
} else {
|
||||||
if (mSystemUserCallbacks != null) {
|
if (mSystemToUserCallbacks != null) {
|
||||||
IRecentsNonSystemUserCallbacks callbacks =
|
IRecentsNonSystemUserCallbacks callbacks =
|
||||||
mSystemUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
|
mSystemToUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
|
||||||
if (callbacks != null) {
|
if (callbacks != null) {
|
||||||
try {
|
try {
|
||||||
callbacks.showRecents(triggeredFromAltTab, false /* draggingInRecents */,
|
callbacks.showRecents(triggeredFromAltTab, false /* draggingInRecents */,
|
||||||
@@ -260,9 +269,9 @@ public class Recents extends SystemUI
|
|||||||
if (sSystemServicesProxy.isSystemUser(currentUser)) {
|
if (sSystemServicesProxy.isSystemUser(currentUser)) {
|
||||||
mImpl.hideRecents(triggeredFromAltTab, triggeredFromHomeKey);
|
mImpl.hideRecents(triggeredFromAltTab, triggeredFromHomeKey);
|
||||||
} else {
|
} else {
|
||||||
if (mSystemUserCallbacks != null) {
|
if (mSystemToUserCallbacks != null) {
|
||||||
IRecentsNonSystemUserCallbacks callbacks =
|
IRecentsNonSystemUserCallbacks callbacks =
|
||||||
mSystemUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
|
mSystemToUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
|
||||||
if (callbacks != null) {
|
if (callbacks != null) {
|
||||||
try {
|
try {
|
||||||
callbacks.hideRecents(triggeredFromAltTab, triggeredFromHomeKey);
|
callbacks.hideRecents(triggeredFromAltTab, triggeredFromHomeKey);
|
||||||
@@ -295,9 +304,9 @@ public class Recents extends SystemUI
|
|||||||
if (sSystemServicesProxy.isSystemUser(currentUser)) {
|
if (sSystemServicesProxy.isSystemUser(currentUser)) {
|
||||||
mImpl.toggleRecents();
|
mImpl.toggleRecents();
|
||||||
} else {
|
} else {
|
||||||
if (mSystemUserCallbacks != null) {
|
if (mSystemToUserCallbacks != null) {
|
||||||
IRecentsNonSystemUserCallbacks callbacks =
|
IRecentsNonSystemUserCallbacks callbacks =
|
||||||
mSystemUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
|
mSystemToUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
|
||||||
if (callbacks != null) {
|
if (callbacks != null) {
|
||||||
try {
|
try {
|
||||||
callbacks.toggleRecents();
|
callbacks.toggleRecents();
|
||||||
@@ -326,9 +335,9 @@ public class Recents extends SystemUI
|
|||||||
if (sSystemServicesProxy.isSystemUser(currentUser)) {
|
if (sSystemServicesProxy.isSystemUser(currentUser)) {
|
||||||
mImpl.preloadRecents();
|
mImpl.preloadRecents();
|
||||||
} else {
|
} else {
|
||||||
if (mSystemUserCallbacks != null) {
|
if (mSystemToUserCallbacks != null) {
|
||||||
IRecentsNonSystemUserCallbacks callbacks =
|
IRecentsNonSystemUserCallbacks callbacks =
|
||||||
mSystemUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
|
mSystemToUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
|
||||||
if (callbacks != null) {
|
if (callbacks != null) {
|
||||||
try {
|
try {
|
||||||
callbacks.preloadRecents();
|
callbacks.preloadRecents();
|
||||||
@@ -354,9 +363,9 @@ public class Recents extends SystemUI
|
|||||||
if (sSystemServicesProxy.isSystemUser(currentUser)) {
|
if (sSystemServicesProxy.isSystemUser(currentUser)) {
|
||||||
mImpl.cancelPreloadingRecents();
|
mImpl.cancelPreloadingRecents();
|
||||||
} else {
|
} else {
|
||||||
if (mSystemUserCallbacks != null) {
|
if (mSystemToUserCallbacks != null) {
|
||||||
IRecentsNonSystemUserCallbacks callbacks =
|
IRecentsNonSystemUserCallbacks callbacks =
|
||||||
mSystemUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
|
mSystemToUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
|
||||||
if (callbacks != null) {
|
if (callbacks != null) {
|
||||||
try {
|
try {
|
||||||
callbacks.cancelPreloadingRecents();
|
callbacks.cancelPreloadingRecents();
|
||||||
@@ -387,9 +396,9 @@ public class Recents extends SystemUI
|
|||||||
if (sSystemServicesProxy.isSystemUser(currentUser)) {
|
if (sSystemServicesProxy.isSystemUser(currentUser)) {
|
||||||
mImpl.dockTopTask(topTask.id, dragMode, stackCreateMode, initialBounds);
|
mImpl.dockTopTask(topTask.id, dragMode, stackCreateMode, initialBounds);
|
||||||
} else {
|
} else {
|
||||||
if (mSystemUserCallbacks != null) {
|
if (mSystemToUserCallbacks != null) {
|
||||||
IRecentsNonSystemUserCallbacks callbacks =
|
IRecentsNonSystemUserCallbacks callbacks =
|
||||||
mSystemUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
|
mSystemToUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
|
||||||
if (callbacks != null) {
|
if (callbacks != null) {
|
||||||
try {
|
try {
|
||||||
callbacks.dockTopTask(topTask.id, dragMode, stackCreateMode,
|
callbacks.dockTopTask(topTask.id, dragMode, stackCreateMode,
|
||||||
@@ -413,9 +422,9 @@ public class Recents extends SystemUI
|
|||||||
if (sSystemServicesProxy.isSystemUser(mDraggingInRecentsCurrentUser)) {
|
if (sSystemServicesProxy.isSystemUser(mDraggingInRecentsCurrentUser)) {
|
||||||
mImpl.onDraggingInRecents(distanceFromTop);
|
mImpl.onDraggingInRecents(distanceFromTop);
|
||||||
} else {
|
} else {
|
||||||
if (mSystemUserCallbacks != null) {
|
if (mSystemToUserCallbacks != null) {
|
||||||
IRecentsNonSystemUserCallbacks callbacks =
|
IRecentsNonSystemUserCallbacks callbacks =
|
||||||
mSystemUserCallbacks.getNonSystemUserRecentsForUser(
|
mSystemToUserCallbacks.getNonSystemUserRecentsForUser(
|
||||||
mDraggingInRecentsCurrentUser);
|
mDraggingInRecentsCurrentUser);
|
||||||
if (callbacks != null) {
|
if (callbacks != null) {
|
||||||
try {
|
try {
|
||||||
@@ -436,9 +445,9 @@ public class Recents extends SystemUI
|
|||||||
if (sSystemServicesProxy.isSystemUser(mDraggingInRecentsCurrentUser)) {
|
if (sSystemServicesProxy.isSystemUser(mDraggingInRecentsCurrentUser)) {
|
||||||
mImpl.onDraggingInRecentsEnded(velocity);
|
mImpl.onDraggingInRecentsEnded(velocity);
|
||||||
} else {
|
} else {
|
||||||
if (mSystemUserCallbacks != null) {
|
if (mSystemToUserCallbacks != null) {
|
||||||
IRecentsNonSystemUserCallbacks callbacks =
|
IRecentsNonSystemUserCallbacks callbacks =
|
||||||
mSystemUserCallbacks.getNonSystemUserRecentsForUser(
|
mSystemToUserCallbacks.getNonSystemUserRecentsForUser(
|
||||||
mDraggingInRecentsCurrentUser);
|
mDraggingInRecentsCurrentUser);
|
||||||
if (callbacks != null) {
|
if (callbacks != null) {
|
||||||
try {
|
try {
|
||||||
@@ -484,9 +493,9 @@ public class Recents extends SystemUI
|
|||||||
if (sSystemServicesProxy.isSystemUser(currentUser)) {
|
if (sSystemServicesProxy.isSystemUser(currentUser)) {
|
||||||
mImpl.onConfigurationChanged();
|
mImpl.onConfigurationChanged();
|
||||||
} else {
|
} else {
|
||||||
if (mSystemUserCallbacks != null) {
|
if (mSystemToUserCallbacks != null) {
|
||||||
IRecentsNonSystemUserCallbacks callbacks =
|
IRecentsNonSystemUserCallbacks callbacks =
|
||||||
mSystemUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
|
mSystemToUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
|
||||||
if (callbacks != null) {
|
if (callbacks != null) {
|
||||||
try {
|
try {
|
||||||
callbacks.onConfigurationChanged();
|
callbacks.onConfigurationChanged();
|
||||||
@@ -512,7 +521,7 @@ public class Recents extends SystemUI
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
mCallbacksToSystemUser.updateRecentsVisibility(event.visible);
|
mUserToSystemCallbacks.updateRecentsVisibility(event.visible);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Callback failed", e);
|
Log.e(TAG, "Callback failed", e);
|
||||||
}
|
}
|
||||||
@@ -533,7 +542,7 @@ public class Recents extends SystemUI
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
mCallbacksToSystemUser.startScreenPinning();
|
mUserToSystemCallbacks.startScreenPinning();
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Callback failed", e);
|
Log.e(TAG, "Callback failed", e);
|
||||||
}
|
}
|
||||||
@@ -549,7 +558,7 @@ public class Recents extends SystemUI
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
mCallbacksToSystemUser.sendRecentsDrawnEvent();
|
mUserToSystemCallbacks.sendRecentsDrawnEvent();
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Callback failed", e);
|
Log.e(TAG, "Callback failed", e);
|
||||||
}
|
}
|
||||||
@@ -565,7 +574,7 @@ public class Recents extends SystemUI
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
mCallbacksToSystemUser.sendDockingTopTaskEvent(event.dragMode);
|
mUserToSystemCallbacks.sendDockingTopTaskEvent(event.dragMode);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Callback failed", e);
|
Log.e(TAG, "Callback failed", e);
|
||||||
}
|
}
|
||||||
@@ -581,7 +590,7 @@ public class Recents extends SystemUI
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
mCallbacksToSystemUser.sendLaunchRecentsEvent();
|
mUserToSystemCallbacks.sendLaunchRecentsEvent();
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Callback failed", e);
|
Log.e(TAG, "Callback failed", e);
|
||||||
}
|
}
|
||||||
@@ -599,7 +608,7 @@ public class Recents extends SystemUI
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
mCallbacksToSystemUser.registerNonSystemUserCallbacks(
|
mUserToSystemCallbacks.registerNonSystemUserCallbacks(
|
||||||
new RecentsImplProxy(mImpl), processUser);
|
new RecentsImplProxy(mImpl), processUser);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Failed to register", e);
|
Log.e(TAG, "Failed to register", e);
|
||||||
@@ -614,11 +623,14 @@ public class Recents extends SystemUI
|
|||||||
*/
|
*/
|
||||||
private void postToSystemUser(final Runnable onConnectRunnable) {
|
private void postToSystemUser(final Runnable onConnectRunnable) {
|
||||||
mOnConnectRunnables.add(onConnectRunnable);
|
mOnConnectRunnables.add(onConnectRunnable);
|
||||||
if (mCallbacksToSystemUser == null) {
|
if (mUserToSystemCallbacks == null) {
|
||||||
Intent systemUserServiceIntent = new Intent();
|
Intent systemUserServiceIntent = new Intent();
|
||||||
systemUserServiceIntent.setClass(mContext, RecentsSystemUserService.class);
|
systemUserServiceIntent.setClass(mContext, RecentsSystemUserService.class);
|
||||||
boolean bound = mContext.bindServiceAsUser(systemUserServiceIntent,
|
boolean bound = mContext.bindServiceAsUser(systemUserServiceIntent,
|
||||||
mServiceConnectionToSystemUser, Context.BIND_AUTO_CREATE, UserHandle.SYSTEM);
|
mUserToSystemServiceConnection, Context.BIND_AUTO_CREATE, UserHandle.SYSTEM);
|
||||||
|
EventLog.writeEvent(EventLogTags.SYSUI_RECENTS_CONNECTION,
|
||||||
|
EventLogConstants.SYSUI_RECENTS_CONNECTION_USER_BIND_SERVICE,
|
||||||
|
sSystemServicesProxy.getProcessUser());
|
||||||
if (!bound) {
|
if (!bound) {
|
||||||
// Retry after a fixed duration
|
// Retry after a fixed duration
|
||||||
mHandler.postDelayed(new Runnable() {
|
mHandler.postDelayed(new Runnable() {
|
||||||
|
|||||||
@@ -19,9 +19,12 @@ package com.android.systemui.recents;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
|
import android.util.EventLog;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.util.SparseArray;
|
import android.util.SparseArray;
|
||||||
|
|
||||||
|
import com.android.systemui.EventLogConstants;
|
||||||
|
import com.android.systemui.EventLogTags;
|
||||||
import com.android.systemui.recents.events.EventBus;
|
import com.android.systemui.recents.events.EventBus;
|
||||||
import com.android.systemui.recents.events.activity.DockingTopTaskEvent;
|
import com.android.systemui.recents.events.activity.DockingTopTaskEvent;
|
||||||
import com.android.systemui.recents.events.activity.RecentsActivityStartingEvent;
|
import com.android.systemui.recents.events.activity.RecentsActivityStartingEvent;
|
||||||
@@ -46,7 +49,8 @@ public class RecentsSystemUser extends IRecentsSystemUserCallbacks.Stub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerNonSystemUserCallbacks(final IBinder nonSystemUserCallbacks, int userId) {
|
public void registerNonSystemUserCallbacks(final IBinder nonSystemUserCallbacks,
|
||||||
|
final int userId) {
|
||||||
try {
|
try {
|
||||||
final IRecentsNonSystemUserCallbacks callback =
|
final IRecentsNonSystemUserCallbacks callback =
|
||||||
IRecentsNonSystemUserCallbacks.Stub.asInterface(nonSystemUserCallbacks);
|
IRecentsNonSystemUserCallbacks.Stub.asInterface(nonSystemUserCallbacks);
|
||||||
@@ -54,9 +58,14 @@ public class RecentsSystemUser extends IRecentsSystemUserCallbacks.Stub {
|
|||||||
@Override
|
@Override
|
||||||
public void binderDied() {
|
public void binderDied() {
|
||||||
mNonSystemUserRecents.removeAt(mNonSystemUserRecents.indexOfValue(callback));
|
mNonSystemUserRecents.removeAt(mNonSystemUserRecents.indexOfValue(callback));
|
||||||
|
EventLog.writeEvent(EventLogTags.SYSUI_RECENTS_CONNECTION,
|
||||||
|
EventLogConstants.SYSUI_RECENTS_CONNECTION_SYSTEM_UNREGISTER_USER,
|
||||||
|
userId);
|
||||||
}
|
}
|
||||||
}, 0);
|
}, 0);
|
||||||
mNonSystemUserRecents.put(userId, callback);
|
mNonSystemUserRecents.put(userId, callback);
|
||||||
|
EventLog.writeEvent(EventLogTags.SYSUI_RECENTS_CONNECTION,
|
||||||
|
EventLogConstants.SYSUI_RECENTS_CONNECTION_SYSTEM_REGISTER_USER, userId);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Failed to register NonSystemUserCallbacks", e);
|
Log.e(TAG, "Failed to register NonSystemUserCallbacks", e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user