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

Commit 9b52525f authored by Xiaohui Chen's avatar Xiaohui Chen Committed by Android (Google) Code Review
Browse files

Merge "clean up UserHandle.USER_OWNER reference"

parents 6bde1ec5 233d94c0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ public class SearchManagerService extends ISearchManager.Stub {
    }

    private void onUserRemoved(int userId) {
        if (userId != UserHandle.USER_OWNER) {
        if (userId != UserHandle.USER_NULL) {
            synchronized (mSearchables) {
                mSearchables.remove(userId);
            }
@@ -133,7 +133,7 @@ public class SearchManagerService extends ISearchManager.Stub {
    private final class UserReceiver extends BroadcastReceiver {
        @Override
        public void onReceive(Context context, Intent intent) {
            onUserRemoved(intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_OWNER));
            onUserRemoved(intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL));
        }
    }

+1 −1
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ public final class TvInputManagerService extends SystemService {
    private final Object mLock = new Object();

    // ID of the current user.
    private int mCurrentUserId = UserHandle.USER_OWNER;
    private int mCurrentUserId = UserHandle.USER_SYSTEM;

    // A map from user id to UserState.
    private final SparseArray<UserState> mUserStates = new SparseArray<>();
+3 −3
Original line number Diff line number Diff line
@@ -484,8 +484,8 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
        mAppOpsManager = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE);
        mMonitor = new MyPackageMonitor();
        mMonitor.register(context, null, UserHandle.ALL, true);
        getWallpaperDir(UserHandle.USER_OWNER).mkdirs();
        loadSettingsLocked(UserHandle.USER_OWNER);
        getWallpaperDir(UserHandle.USER_SYSTEM).mkdirs();
        loadSettingsLocked(UserHandle.USER_SYSTEM);
    }
    
    private static File getWallpaperDir(int userId) {
@@ -503,7 +503,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {

    public void systemRunning() {
        if (DEBUG) Slog.v(TAG, "systemReady");
        WallpaperData wallpaper = mWallpaperMap.get(UserHandle.USER_OWNER);
        WallpaperData wallpaper = mWallpaperMap.get(UserHandle.USER_SYSTEM);
        switchWallpaper(wallpaper, null);
        wallpaper.wallpaperObserver = new WallpaperObserver(wallpaper);
        wallpaper.wallpaperObserver.startWatching();
+1 −1
Original line number Diff line number Diff line
@@ -451,7 +451,7 @@ public class UsageStatsService extends SystemService implements
    }

    private File getScreenOnTimeFile() {
        return new File(mUsageStatsDir, UserHandle.USER_OWNER + "/screen_on_time");
        return new File(mUsageStatsDir, UserHandle.USER_SYSTEM + "/screen_on_time");
    }

    private long readScreenOnTimeLocked() {
+1 −1
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ public class UsbService extends IUsbManager.Stub {
            mPortManager = new UsbPortManager(context);
        }

        setCurrentUser(UserHandle.USER_OWNER);
        setCurrentUser(UserHandle.USER_SYSTEM);

        final IntentFilter filter = new IntentFilter();
        filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);