summaryrefslogtreecommitdiff
path: root/com/android/server/backup/Trampoline.java
diff options
context:
space:
mode:
Diffstat (limited to 'com/android/server/backup/Trampoline.java')
-rw-r--r--com/android/server/backup/Trampoline.java29
1 files changed, 6 insertions, 23 deletions
diff --git a/com/android/server/backup/Trampoline.java b/com/android/server/backup/Trampoline.java
index 9847edf8..9739e380 100644
--- a/com/android/server/backup/Trampoline.java
+++ b/com/android/server/backup/Trampoline.java
@@ -28,15 +28,11 @@ import android.content.Context;
import android.content.Intent;
import android.os.Binder;
import android.os.Environment;
-import android.os.Handler;
-import android.os.HandlerThread;
import android.os.IBinder;
-import android.os.Looper;
import android.os.ParcelFileDescriptor;
import android.os.Process;
import android.os.RemoteException;
import android.os.SystemProperties;
-import android.os.Trace;
import android.os.UserHandle;
import android.provider.Settings;
import android.util.Slog;
@@ -79,8 +75,6 @@ public class Trampoline extends IBackupManager.Stub {
final boolean mGlobalDisable;
volatile BackupManagerServiceInterface mService;
- private HandlerThread mHandlerThread;
-
public Trampoline(Context context) {
mContext = context;
mGlobalDisable = isBackupDisabled();
@@ -117,11 +111,11 @@ public class Trampoline extends IBackupManager.Stub {
}
protected BackupManagerServiceInterface createRefactoredBackupManagerService() {
- return new RefactoredBackupManagerService(mContext, this, mHandlerThread);
+ return new RefactoredBackupManagerService(mContext, this);
}
protected BackupManagerServiceInterface createBackupManagerService() {
- return new BackupManagerService(mContext, this, mHandlerThread);
+ return new BackupManagerService(mContext, this);
}
// internal control API
@@ -146,21 +140,10 @@ public class Trampoline extends IBackupManager.Stub {
}
void unlockSystemUser() {
- mHandlerThread = new HandlerThread("backup", Process.THREAD_PRIORITY_BACKGROUND);
- mHandlerThread.start();
-
- Handler h = new Handler(mHandlerThread.getLooper());
- h.post(() -> {
- Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "backup init");
- initialize(UserHandle.USER_SYSTEM);
- Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
-
- BackupManagerServiceInterface svc = mService;
- Slog.i(TAG, "Unlocking system user; mService=" + mService);
- if (svc != null) {
- svc.unlockSystemUser();
- }
- });
+ BackupManagerServiceInterface svc = mService;
+ if (svc != null) {
+ svc.unlockSystemUser();
+ }
}
public void setBackupServiceActive(final int userHandle, boolean makeActive) {