diff options
Diffstat (limited to 'tests/src/com/android/providers/downloads/FakeSystemFacade.java')
-rw-r--r-- | tests/src/com/android/providers/downloads/FakeSystemFacade.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/src/com/android/providers/downloads/FakeSystemFacade.java b/tests/src/com/android/providers/downloads/FakeSystemFacade.java index 4ff313ab..0f8a9801 100644 --- a/tests/src/com/android/providers/downloads/FakeSystemFacade.java +++ b/tests/src/com/android/providers/downloads/FakeSystemFacade.java @@ -1,12 +1,18 @@ package com.android.providers.downloads; +import android.content.Intent; +import android.content.pm.PackageManager.NameNotFoundException; import android.net.ConnectivityManager; +import java.util.ArrayList; +import java.util.List; + public class FakeSystemFacade implements SystemFacade { long mTimeMillis = 0; Integer mActiveNetworkType = ConnectivityManager.TYPE_WIFI; boolean mIsRoaming = false; Integer mMaxBytesOverMobile = null; + List<Intent> mBroadcastsSent = new ArrayList<Intent>(); void incrementTimeMillis(long delta) { mTimeMillis += delta; @@ -27,4 +33,14 @@ public class FakeSystemFacade implements SystemFacade { public Integer getMaxBytesOverMobile() { return mMaxBytesOverMobile ; } + + @Override + public void sendBroadcast(Intent intent) { + mBroadcastsSent.add(intent); + } + + @Override + public boolean userOwnsPackage(int uid, String pckg) throws NameNotFoundException { + return true; + } } |