am 00556831: am f18a01c7: Rename [I]DropBox[Service] to [I]DropBoxManager[Service].

Merge commit '00556831f7503a922a5402c525b4387ebdd1a4bb'

* commit '00556831f7503a922a5402c525b4387ebdd1a4bb':
  Rename [I]DropBox[Service] to [I]DropBoxManager[Service].
This commit is contained in:
Dan Egnor
2009-11-12 14:19:27 -08:00
committed by Android Git Automerger
11 changed files with 468 additions and 134 deletions

View File

@@ -70,7 +70,7 @@ import android.net.wifi.IWifiManager;
import android.net.wifi.WifiManager;
import android.os.Binder;
import android.os.Bundle;
import android.os.DropBox;
import android.os.DropBoxManager;
import android.os.FileUtils;
import android.os.Handler;
import android.os.IBinder;
@@ -94,7 +94,7 @@ import android.view.inputmethod.InputMethodManager;
import android.accounts.AccountManager;
import android.accounts.IAccountManager;
import com.android.internal.os.IDropBoxService;
import com.android.internal.os.IDropBoxManagerService;
import java.io.File;
import java.io.FileInputStream;
@@ -185,7 +185,7 @@ class ApplicationContext extends Context {
private ClipboardManager mClipboardManager = null;
private boolean mRestricted;
private AccountManager mAccountManager; // protected by mSync
private DropBox mDropBox = null;
private DropBoxManager mDropBoxManager = null;
private final Object mSync = new Object();
@@ -901,7 +901,7 @@ class ApplicationContext extends Context {
} else if (WALLPAPER_SERVICE.equals(name)) {
return getWallpaperManager();
} else if (DROPBOX_SERVICE.equals(name)) {
return getDropBox();
return getDropBoxManager();
}
return null;
@@ -1060,15 +1060,15 @@ class ApplicationContext extends Context {
return mAudioManager;
}
private DropBox getDropBox() {
private DropBoxManager getDropBoxManager() {
synchronized (mSync) {
if (mDropBox == null) {
if (mDropBoxManager == null) {
IBinder b = ServiceManager.getService(DROPBOX_SERVICE);
IDropBoxService service = IDropBoxService.Stub.asInterface(b);
mDropBox = new DropBox(service);
IDropBoxManagerService service = IDropBoxManagerService.Stub.asInterface(b);
mDropBoxManager = new DropBoxManager(service);
}
}
return mDropBox;
return mDropBoxManager;
}
@Override

View File

@@ -1324,7 +1324,6 @@ public abstract class Context {
* Use with {@link #getSystemService} to retrieve a
* {@blink android.os.DropBox DropBox} instance for recording
* diagnostic logs.
* @hide
* @see #getSystemService
*/
public static final String DROPBOX_SERVICE = "dropbox";

View File

@@ -16,4 +16,4 @@
package android.os;
parcelable DropBox.Entry;
parcelable DropBoxManager.Entry;

View File

@@ -18,7 +18,7 @@ package android.os;
import android.util.Log;
import com.android.internal.os.IDropBoxService;
import com.android.internal.os.IDropBoxManagerService;
import java.io.ByteArrayInputStream;
import java.io.File;
@@ -37,14 +37,12 @@ import java.util.zip.GZIPInputStream;
* {@link android.content.Context#getSystemService}
* with {@link android.content.Context#DROPBOX_SERVICE}.
*
* <p>DropBox entries are not sent anywhere directly, but other system services
* and debugging tools may scan and upload entries for processing.
*
* {@pending}
* <p>DropBoxManager entries are not sent anywhere directly, but other system
* services and debugging tools may scan and upload entries for processing.
*/
public class DropBox {
private static final String TAG = "DropBox";
private final IDropBoxService mService;
public class DropBoxManager {
private static final String TAG = "DropBoxManager";
private final IDropBoxManagerService mService;
/** Flag value: Entry's content was deleted to save space. */
public static final int IS_EMPTY = 1;
@@ -198,14 +196,14 @@ public class DropBox {
}
/** {@hide} */
public DropBox(IDropBoxService service) { mService = service; }
public DropBoxManager(IDropBoxManagerService service) { mService = service; }
/**
* Create a dummy instance for testing. All methods will fail unless
* overridden with an appropriate mock implementation. To obtain a
* functional instance, use {@link android.content.Context#getSystemService}.
*/
protected DropBox() { mService = null; }
protected DropBoxManager() { mService = null; }
/**
* Stores human-readable text. The data may be discarded eventually (or even

View File

@@ -16,27 +16,27 @@
package com.android.internal.os;
import android.os.DropBox;
import android.os.DropBoxManager;
import android.os.ParcelFileDescriptor;
/**
* "Backend" interface used by {@link android.os.DropBox} to talk to the
* DropBoxService that actually implements the drop box functionality.
* "Backend" interface used by {@link android.os.DropBoxManager} to talk to the
* DropBoxManagerService that actually implements the drop box functionality.
*
* @see DropBox
* @see DropBoxManager
* @hide
*/
interface IDropBoxService {
interface IDropBoxManagerService {
/**
* @see DropBox#addText
* @see DropBox#addData
* @see DropBox#addFile
* @see DropBoxManager#addText
* @see DropBoxManager#addData
* @see DropBoxManager#addFile
*/
void add(in DropBox.Entry entry);
void add(in DropBoxManager.Entry entry);
/** @see DropBox#getNextEntry */
/** @see DropBoxManager#getNextEntry */
boolean isTagEnabled(String tag);
/** @see DropBox#getNextEntry */
DropBox.Entry getNextEntry(String tag, long millis);
/** @see DropBoxManager#getNextEntry */
DropBoxManager.Entry getNextEntry(String tag, long millis);
}