OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 package org.chromium.components.minidump_uploader.util; | |
6 | |
7 import android.net.ConnectivityManager; | |
8 import android.net.NetworkInfo; | |
9 | |
10 /** | |
11 * A container for determining whether it's ok to upload crash reports over the currently active | |
12 * network. | |
13 */ | |
14 public class CrashReportingNetworkPermissionManager { | |
Maria
2017/03/17 04:04:28
given that there's nothing specific to crash repor
Maria
2017/03/17 04:04:28
FYI, you are missing a BUILD file change to add th
gsennton
2017/03/20 17:29:01
+1 for the name change
Ilya Sherman
2017/03/20 23:11:21
Done.
Ilya Sherman
2017/03/20 23:11:21
Done.
| |
15 static boolean isNetworkUnmetered(ConnectivityManager connectivityManager) { | |
16 NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); | |
17 if (networkInfo == null || !networkInfo.isConnected()) return false; | |
18 return !mConnectivityManager.isActiveNetworkMetered(); | |
19 } | |
20 } | |
OLD | NEW |