Loading core/java/android/app/ContextImpl.java +13 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ import android.location.LocationManager; import android.media.AudioManager; import android.net.ConnectivityManager; import android.net.IConnectivityManager; import android.net.DownloadManager; import android.net.ThrottleManager; import android.net.IThrottleManager; import android.net.Uri; Loading Loading @@ -196,6 +197,7 @@ class ContextImpl extends Context { private DropBoxManager mDropBoxManager = null; private DevicePolicyManager mDevicePolicyManager = null; private UiModeManager mUiModeManager = null; private DownloadManager mDownloadManager = null; private final Object mSync = new Object(); Loading Loading @@ -970,6 +972,8 @@ class ContextImpl extends Context { return getDevicePolicyManager(); } else if (UI_MODE_SERVICE.equals(name)) { return getUiModeManager(); } else if (DOWNLOAD_SERVICE.equals(name)) { return getDownloadManager(); } return null; Loading Loading @@ -1188,6 +1192,15 @@ class ContextImpl extends Context { return mUiModeManager; } private DownloadManager getDownloadManager() { synchronized (mSync) { if (mDownloadManager == null) { mDownloadManager = new DownloadManager(getContentResolver()); } } return mDownloadManager; } @Override public int checkPermission(String permission, int pid, int uid) { if (permission == null) { Loading core/java/android/content/Context.java +9 −0 Original line number Diff line number Diff line Loading @@ -1534,6 +1534,15 @@ public abstract class Context { */ public static final String UI_MODE_SERVICE = "uimode"; /** * Use with {@link #getSystemService} to retrieve a * {@link android.net.DownloadManager} for requesting HTTP downloads. * * @see #getSystemService * @hide (TODO) for now */ public static final String DOWNLOAD_SERVICE = "download"; /** * Determine whether the given permission is allowed for a particular * process and user ID running in the system. Loading core/java/android/net/DownloadManager.java 0 → 100644 +719 −0 File added.Preview size limit exceeded, changes collapsed. Show changes Loading
core/java/android/app/ContextImpl.java +13 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ import android.location.LocationManager; import android.media.AudioManager; import android.net.ConnectivityManager; import android.net.IConnectivityManager; import android.net.DownloadManager; import android.net.ThrottleManager; import android.net.IThrottleManager; import android.net.Uri; Loading Loading @@ -196,6 +197,7 @@ class ContextImpl extends Context { private DropBoxManager mDropBoxManager = null; private DevicePolicyManager mDevicePolicyManager = null; private UiModeManager mUiModeManager = null; private DownloadManager mDownloadManager = null; private final Object mSync = new Object(); Loading Loading @@ -970,6 +972,8 @@ class ContextImpl extends Context { return getDevicePolicyManager(); } else if (UI_MODE_SERVICE.equals(name)) { return getUiModeManager(); } else if (DOWNLOAD_SERVICE.equals(name)) { return getDownloadManager(); } return null; Loading Loading @@ -1188,6 +1192,15 @@ class ContextImpl extends Context { return mUiModeManager; } private DownloadManager getDownloadManager() { synchronized (mSync) { if (mDownloadManager == null) { mDownloadManager = new DownloadManager(getContentResolver()); } } return mDownloadManager; } @Override public int checkPermission(String permission, int pid, int uid) { if (permission == null) { Loading
core/java/android/content/Context.java +9 −0 Original line number Diff line number Diff line Loading @@ -1534,6 +1534,15 @@ public abstract class Context { */ public static final String UI_MODE_SERVICE = "uimode"; /** * Use with {@link #getSystemService} to retrieve a * {@link android.net.DownloadManager} for requesting HTTP downloads. * * @see #getSystemService * @hide (TODO) for now */ public static final String DOWNLOAD_SERVICE = "download"; /** * Determine whether the given permission is allowed for a particular * process and user ID running in the system. Loading
core/java/android/net/DownloadManager.java 0 → 100644 +719 −0 File added.Preview size limit exceeded, changes collapsed. Show changes