diff options
author | Ang Li <angli@google.com> | 2019-01-11 12:51:57 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-11 12:51:57 -0800 |
commit | 35e1bfad098f65db344d4d6fd7abb5830d8aa7a2 (patch) | |
tree | beaaeacddf74b89951433c7c37cec0e10a605a2a /src/main/java/com/google/android/mobly/snippet/bundled/NetworkingSnippet.java | |
parent | 2fa52efb68751e9729ac733548687889e8cfb884 (diff) | |
download | mobly-bundled-snippets-35e1bfad098f65db344d4d6fd7abb5830d8aa7a2.tar.gz |
Migrate to androidx packages (#105)
Diffstat (limited to 'src/main/java/com/google/android/mobly/snippet/bundled/NetworkingSnippet.java')
-rw-r--r-- | src/main/java/com/google/android/mobly/snippet/bundled/NetworkingSnippet.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/com/google/android/mobly/snippet/bundled/NetworkingSnippet.java b/src/main/java/com/google/android/mobly/snippet/bundled/NetworkingSnippet.java index e89fc12..636c0fd 100644 --- a/src/main/java/com/google/android/mobly/snippet/bundled/NetworkingSnippet.java +++ b/src/main/java/com/google/android/mobly/snippet/bundled/NetworkingSnippet.java @@ -23,7 +23,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.net.Uri; import android.os.Environment; -import android.support.test.InstrumentationRegistry; +import androidx.test.platform.app.InstrumentationRegistry; import com.google.android.mobly.snippet.Snippet; import com.google.android.mobly.snippet.bundled.utils.Utils; import com.google.android.mobly.snippet.rpc.Rpc; @@ -44,7 +44,7 @@ public class NetworkingSnippet implements Snippet { private volatile long mReqid = 0; public NetworkingSnippet() { - mContext = InstrumentationRegistry.getContext(); + mContext = InstrumentationRegistry.getInstrumentation().getContext(); mDownloadManager = (DownloadManager) mContext.getSystemService(Context.DOWNLOAD_SERVICE); } @@ -78,10 +78,9 @@ public class NetworkingSnippet implements Snippet { } @Rpc( - description = - "Download a file using HTTP. Return content Uri (file remains on device). " - + "The Uri should be treated as an opaque handle for further operations." - ) + description = + "Download a file using HTTP. Return content Uri (file remains on device). " + + "The Uri should be treated as an opaque handle for further operations.") public String networkHttpDownload(String url) throws IllegalArgumentException, NetworkingSnippetException { |