Loading services/core/java/com/android/server/PinnerService.java +5 −19 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityManagerInternal; import android.app.IActivityManager; import android.app.SearchManager; import android.app.UidObserver; import android.app.pinner.IPinnerService; import android.app.pinner.PinnedFileStat; Loading @@ -53,7 +52,6 @@ import android.os.RemoteException; import android.os.ResultReceiver; import android.os.ShellCallback; import android.os.SystemProperties; import android.os.Trace; import android.os.UserHandle; import android.os.UserManager; import android.provider.DeviceConfig; Loading Loading @@ -139,7 +137,6 @@ public final class PinnerService extends SystemService { private final ActivityManagerInternal mAmInternal; private final IActivityManager mAm; private final UserManager mUserManager; private SearchManager mSearchManager; /** The list of the statically pinned files. */ @GuardedBy("this") private final ArrayMap<String, PinnedFile> mPinnedFiles = new ArrayMap<>(); Loading Loading @@ -283,15 +280,6 @@ public final class PinnerService extends SystemService { sendPinAppsMessage(UserHandle.USER_SYSTEM); } @Override public void onBootPhase(int phase) { // SearchManagerService is started after PinnerService, wait for PHASE_SYSTEM_SERVICES_READY if (phase == SystemService.PHASE_SYSTEM_SERVICES_READY) { mSearchManager = (SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE); sendPinAppsMessage(UserHandle.USER_SYSTEM); } } /** * Repin apps on user switch. * <p> Loading @@ -308,8 +296,9 @@ public final class PinnerService extends SystemService { @Override public void onUserUnlocking(@NonNull TargetUser user) { int userId = user.getUserIdentifier(); if (!mUserManager.isManagedProfile(userId)) { final int userId = user.getUserIdentifier(); if (userId != UserHandle.USER_SYSTEM && !mUserManager.isManagedProfile(userId)) { // App pinning for the system should have already been triggered from onStart(). sendPinAppsMessage(userId); } } Loading Loading @@ -532,12 +521,9 @@ public final class PinnerService extends SystemService { } private ApplicationInfo getAssistantInfo(int userHandle) { if (mSearchManager != null) { Intent intent = mSearchManager.getAssistIntent(false); Intent intent = new Intent(Intent.ACTION_ASSIST); return getApplicationInfoForIntent(intent, userHandle, true); } return null; } private ApplicationInfo getApplicationInfoForIntent(Intent intent, int userHandle, boolean defaultToSystemApp) { Loading Loading
services/core/java/com/android/server/PinnerService.java +5 −19 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityManagerInternal; import android.app.IActivityManager; import android.app.SearchManager; import android.app.UidObserver; import android.app.pinner.IPinnerService; import android.app.pinner.PinnedFileStat; Loading @@ -53,7 +52,6 @@ import android.os.RemoteException; import android.os.ResultReceiver; import android.os.ShellCallback; import android.os.SystemProperties; import android.os.Trace; import android.os.UserHandle; import android.os.UserManager; import android.provider.DeviceConfig; Loading Loading @@ -139,7 +137,6 @@ public final class PinnerService extends SystemService { private final ActivityManagerInternal mAmInternal; private final IActivityManager mAm; private final UserManager mUserManager; private SearchManager mSearchManager; /** The list of the statically pinned files. */ @GuardedBy("this") private final ArrayMap<String, PinnedFile> mPinnedFiles = new ArrayMap<>(); Loading Loading @@ -283,15 +280,6 @@ public final class PinnerService extends SystemService { sendPinAppsMessage(UserHandle.USER_SYSTEM); } @Override public void onBootPhase(int phase) { // SearchManagerService is started after PinnerService, wait for PHASE_SYSTEM_SERVICES_READY if (phase == SystemService.PHASE_SYSTEM_SERVICES_READY) { mSearchManager = (SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE); sendPinAppsMessage(UserHandle.USER_SYSTEM); } } /** * Repin apps on user switch. * <p> Loading @@ -308,8 +296,9 @@ public final class PinnerService extends SystemService { @Override public void onUserUnlocking(@NonNull TargetUser user) { int userId = user.getUserIdentifier(); if (!mUserManager.isManagedProfile(userId)) { final int userId = user.getUserIdentifier(); if (userId != UserHandle.USER_SYSTEM && !mUserManager.isManagedProfile(userId)) { // App pinning for the system should have already been triggered from onStart(). sendPinAppsMessage(userId); } } Loading Loading @@ -532,12 +521,9 @@ public final class PinnerService extends SystemService { } private ApplicationInfo getAssistantInfo(int userHandle) { if (mSearchManager != null) { Intent intent = mSearchManager.getAssistIntent(false); Intent intent = new Intent(Intent.ACTION_ASSIST); return getApplicationInfoForIntent(intent, userHandle, true); } return null; } private ApplicationInfo getApplicationInfoForIntent(Intent intent, int userHandle, boolean defaultToSystemApp) { Loading