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