Remove sdcard developer option, avoid data crash.
Remove READ_EXTERNAL_STORAGE enforcement UI, since the permission is now always enforced. Check to see if bandwidth module is enabled when launching data usage, and finish gracefully if disabled. Bug: 10116515, 10392597 Change-Id: Id0295c405b780a53867934b3bcd0a5f56db7d87a
This commit is contained in:
@@ -141,13 +141,13 @@ import com.android.settings.widget.ChartDataUsageView.DataUsageChartListener;
|
||||
import com.android.settings.widget.PieChartView;
|
||||
import com.google.android.collect.Lists;
|
||||
|
||||
import libcore.util.Objects;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import libcore.util.Objects;
|
||||
|
||||
/**
|
||||
* Panel showing data usage history across various networks, including options
|
||||
* to inspect based on usage cycle and control through {@link NetworkPolicy}.
|
||||
@@ -276,6 +276,16 @@ public class DataUsageSummary extends Fragment {
|
||||
mPolicyEditor = new NetworkPolicyEditor(mPolicyManager);
|
||||
mPolicyEditor.read();
|
||||
|
||||
try {
|
||||
if (!mNetworkService.isBandwidthControlEnabled()) {
|
||||
Log.w(TAG, "No bandwidth control; leaving");
|
||||
getActivity().finish();
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "No bandwidth control; leaving");
|
||||
getActivity().finish();
|
||||
}
|
||||
|
||||
try {
|
||||
mStatsSession = mStatsService.openSession();
|
||||
} catch (RemoteException e) {
|
||||
|
||||
Reference in New Issue
Block a user