Better API for low disk space warnings.

Provides uniform interface to ask about low disk thresholds; can
be mocked by other tests.  Opens door to adjust thresholds based on
disk type.

Switch monitor service to using new API, and use filesystem paths
from Environment instead of hard-coding.

Change-Id: Ifdb536e36a453f1b67bc65849037ec3cc0232cf2
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index a40fe75..734d435 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -460,7 +460,8 @@
         registerService(STORAGE_SERVICE, new ServiceFetcher() {
                 public Object createService(ContextImpl ctx) {
                     try {
-                        return new StorageManager(ctx.mMainThread.getHandler().getLooper());
+                        return new StorageManager(
+                                ctx.getContentResolver(), ctx.mMainThread.getHandler().getLooper());
                     } catch (RemoteException rex) {
                         Log.e(TAG, "Failed to create StorageManager", rex);
                         return null;