Skip to content

Commit

Permalink
disable network usage
Browse files Browse the repository at this point in the history
  • Loading branch information
dslul committed Jan 15, 2020
1 parent 24baf3f commit da35988
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "org.dslul.openboard.inputmethod.latin"
minSdkVersion 14
targetSdkVersion 29
versionCode 1
versionName "1.0"
versionCode 3
versionName "1.1"
}

buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public final class DictionarySettingsFragment extends PreferenceFragment

private View mLoadingView;
private String mClientId;
private ConnectivityManager mConnectivityManager;
//private ConnectivityManager mConnectivityManager;
private MenuItem mUpdateNowMenu;
private boolean mChangedSettings;
private DictionaryListInterfaceState mDictionaryListInterfaceState =
Expand Down Expand Up @@ -98,8 +98,8 @@ public void onActivityCreated(final Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
final Activity activity = getActivity();
mClientId = activity.getIntent().getStringExtra(DICT_SETTINGS_FRAGMENT_CLIENT_ID_ARGUMENT);
mConnectivityManager =
(ConnectivityManager)activity.getSystemService(Context.CONNECTIVITY_SERVICE);
/*mConnectivityManager =
(ConnectivityManager)activity.getSystemService(Context.CONNECTIVITY_SERVICE);*/
addPreferencesFromResource(R.xml.dictionary_settings);
refreshInterface();
setHasOptionsMenu(true);
Expand Down Expand Up @@ -224,9 +224,11 @@ private WordListPreference findWordListPreference(final String id) {
public void updateCycleCompleted() {}

void refreshNetworkState() {
/*
NetworkInfo info = mConnectivityManager.getActiveNetworkInfo();
boolean isConnected = null == info ? false : info.isConnected();
if (null != mUpdateNowMenu) mUpdateNowMenu.setEnabled(isConnected);
*/
if (null != mUpdateNowMenu) mUpdateNowMenu.setEnabled(false);
}

void refreshInterface() {
Expand Down

0 comments on commit da35988

Please sign in to comment.