Skip to content

Commit

Permalink
network scanner has been moved to a separate plugin
Browse files Browse the repository at this point in the history
Conflicts:

	AndroidManifest.xml
	AndroidManifest.xml.pattern
	src/org/geometerplus/android/fbreader/network/ScanLocalNetworkActivity.java
  • Loading branch information
geometer committed Feb 22, 2012
1 parent 97ce111 commit bd032e8
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 542 deletions.
7 changes: 1 addition & 6 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<application android:name="org.geometerplus.android.fbreader.FBReaderApplication" android:icon="@drawable/fbreader" android:label="FBReader">
<activity android:name=".library.BugReportActivity" android:label="FBReader crash" android:configChanges="orientation|keyboardHidden" android:process=":crash" />
<activity android:name="org.geometerplus.android.fbreader.crash.FixBooksDirectoryActivity" android:theme="@android:style/Theme.Dialog" android:configChanges="orientation|keyboardHidden" android:process=":crash">
Expand Down Expand Up @@ -187,12 +185,9 @@
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="*" android:scheme="opds" />
</intent-filter>
</activity>
<activity android:name="org.geometerplus.android.fbreader.network.ScanLocalNetworkActivity" android:process=":networkLibrary" android:theme="@android:style/Theme.Dialog" android:configChanges="orientation|keyboardHidden">
<intent-filter>
<action android:name="android.fbreader.action.ADD_OPDS_CATALOG" />
<action android:name="android.fbreader.action.ADD_OPDS_CATALOG_URL" />
<category android:name="android.intent.category.DEFAULT" />
<data android:host="data.fbreader.org" android:scheme="http" android:path="/add_catalog/scanLocalNetwork"/>
</intent-filter>
</activity>
<activity android:name="org.geometerplus.android.fbreader.network.AuthorizationMenuActivity" android:process=":networkLibrary" android:theme="@android:style/Theme.Dialog" android:configChanges="orientation|keyboardHidden"/>
Expand Down
9 changes: 0 additions & 9 deletions AndroidManifest.xml.pattern
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<application android:name="org.geometerplus.android.fbreader.FBReaderApplication" android:icon="@drawable/fbreader" android:label="FBReader">
<activity android:name=".library.BugReportActivity" android:label="FBReader crash" android:configChanges="orientation|keyboardHidden" android:process=":crash" />
<activity android:name="org.geometerplus.android.fbreader.crash.FixBooksDirectoryActivity" android:theme="@android:style/Theme.Dialog" android:configChanges="orientation|keyboardHidden" android:process=":crash">
Expand Down Expand Up @@ -188,13 +186,6 @@
<data android:host="*" android:scheme="opds" />
</intent-filter>
</activity>
<activity android:name="org.geometerplus.android.fbreader.network.ScanLocalNetworkActivity" android:process=":networkLibrary" android:theme="@android:style/Theme.Dialog" android:configChanges="orientation|keyboardHidden">
<intent-filter>
<action android:name="android.fbreader.action.ADD_OPDS_CATALOG" />
<category android:name="android.intent.category.DEFAULT" />
<data android:host="data.fbreader.org" android:scheme="http" android:path="/add_catalog/scanLocalNetwork"/>
</intent-filter>
</activity>
<activity android:name="org.geometerplus.android.fbreader.network.AuthorizationMenuActivity" android:process=":networkLibrary" android:theme="@android:style/Theme.Dialog" android:configChanges="orientation|keyboardHidden"/>
<activity android:name="org.geometerplus.android.fbreader.network.TopupMenuActivity" android:process=":networkLibrary" android:theme="@android:style/Theme.Dialog" android:configChanges="orientation|keyboardHidden"/>
<activity android:name="org.geometerplus.android.fbreader.network.NetworkBookInfoActivity" android:process=":networkLibrary" android:configChanges="orientation|keyboardHidden">
Expand Down
9 changes: 0 additions & 9 deletions assets/resources/application/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,6 @@
<node name="addCatalog">
<node name="title" value="Add catalog"/>
<node name="editUrl" value="Enter URL manually"/>
<node name="scanLocalNetwork" value="Scan local network"/>
<node name="localCatalogs" value="Local OPDS catalogs"/>
<node name="noCatalogsFound" value="No catalogs found, sorry"/>
<node name="noLocalConnection" value="Your device is not connected to a local network"/>
<node name="wifiIsTurnedOff" value="WiFi is turned off"/>
<node name="turnWiFiOn" value="Please, turn WiFi on and try again"/>
<node name="scanningLocalNetwork" value="Scanning local network. Please, wait&#8230;"/>
</node>
<node name="menu">
<node name="networkSearch" value="Search"/>
Expand Down Expand Up @@ -282,8 +275,6 @@
<node name="pay" value="Pay"/>
<node name="refresh" value="Refresh"/>
<node name="authorize" value="Authorize"/>
<node name="rescan" value="Rescan" />
<node name="turnOn" value="Turn on" />
<node name="resetPosition" value="Reset position" />
</node>
<node name="plugin">
Expand Down
Binary file removed icons/library/ic_list_library_calibre.png
Binary file not shown.
Binary file removed libs/jmdns.jar
Binary file not shown.
33 changes: 0 additions & 33 deletions res/layout/local_service_item.xml

This file was deleted.

25 changes: 0 additions & 25 deletions res/layout/scan_local_network.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private void addItem(String id, int weight) {
protected void init() {
setTitle(myResource.getResource("title").getValue());
addItem("editUrl", 1);
addItem("scanLocalNetwork", 2);
//addItem("scanLocalNetwork", 2);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ public void onClick(View view) {
myEditNotAdd = Util.EDIT_CATALOG_ACTION.equals(action);
myLink = null;
Uri uri = null;
if (myEditNotAdd || Intent.ACTION_VIEW.equals(action)) {
if (myEditNotAdd ||
Intent.ACTION_VIEW.equals(action) ||
Util.ADD_CATALOG_URL_ACTION.equals(action)) {
uri = intent.getData();
if (uri != null) {
if ("opds".equals(uri.getScheme())) {
Expand All @@ -106,10 +108,7 @@ public void onClick(View view) {
}
}

final INetworkLink.Type type = (INetworkLink.Type)intent.getSerializableExtra(TYPE);
if (type != null) {
myType = type;
}
myType = INetworkLink.Type.byIndex(intent.getIntExtra(TYPE, myType.Index));
}

if (myLink != null) {
Expand Down
Loading

0 comments on commit bd032e8

Please sign in to comment.