mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-23 20:54:13 -04:00
Refactor
This commit is contained in:
parent
4797cae7fa
commit
58c936b4fe
@ -1,6 +1,5 @@
|
|||||||
package org.kiwix.kiwixmobile.utils
|
package org.kiwix.kiwixmobile.utils
|
||||||
|
|
||||||
import android.net.wifi.p2p.WifiP2pDevice
|
|
||||||
import org.kiwix.kiwixmobile.R
|
import org.kiwix.kiwixmobile.R
|
||||||
import org.kiwix.kiwixmobile.zim_manager.fileselect_view.adapter.BooksOnDiskListItem.BookOnDisk
|
import org.kiwix.kiwixmobile.zim_manager.fileselect_view.adapter.BooksOnDiskListItem.BookOnDisk
|
||||||
|
|
||||||
|
@ -129,10 +129,7 @@ class ZimManageActivity : BaseActivity() {
|
|||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||||
when (item.itemId) {
|
when (item.itemId) {
|
||||||
R.id.select_language -> start<LanguageActivity>()
|
R.id.select_language -> start<LanguageActivity>()
|
||||||
|
R.id.get_zim_nearby_device -> start<LocalFileTransferActivity>()
|
||||||
R.id.get_zim_nearby_device -> {
|
|
||||||
startActivity(Intent(this, LocalFileTransferActivity::class.java));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return super.onOptionsItemSelected(item)
|
return super.onOptionsItemSelected(item)
|
||||||
}
|
}
|
||||||
|
@ -573,7 +573,6 @@ public class LocalFileTransferActivity extends AppCompatActivity implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
super.onBackPressed();
|
|
||||||
wifiDirectManager.closeLocalFileTransferActivity();
|
wifiDirectManager.closeLocalFileTransferActivity();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ class PeerGroupHandshakeAsyncTask extends AsyncTask<Void, Void, InetAddress> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isKiwixHandshake(Object object) {
|
private boolean isKiwixHandshake(Object object) {
|
||||||
return (object.getClass().equals(String.class) && object.equals(HANDSHAKE_MESSAGE));
|
return HANDSHAKE_MESSAGE.equals(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void exchangeFileTransferMetadata(OutputStream outputStream, InputStream inputStream) {
|
private void exchangeFileTransferMetadata(OutputStream outputStream, InputStream inputStream) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user