Transport options removed. Conversation activity cleanup.

This commit is contained in:
Anton Chekulaev
2020-12-07 17:40:47 +11:00
parent 66aec427d4
commit 30af903572
19 changed files with 156 additions and 1134 deletions

View File

@@ -73,7 +73,6 @@ public class ShareActivity extends PassphraseRequiredActionBarActivity
public static final String EXTRA_ADDRESS_MARSHALLED = "address_marshalled";
public static final String EXTRA_DISTRIBUTION_TYPE = "distribution_type";
private final DynamicLanguage dynamicLanguage = new DynamicLanguage();
private ContactSelectionListFragment contactsFragment;
private SearchToolbar searchToolbar;
@@ -83,11 +82,6 @@ public class ShareActivity extends PassphraseRequiredActionBarActivity
private String mimeType;
private boolean isPassingAlongMedia;
@Override
protected void onPreCreate() {
dynamicLanguage.onCreate(this);
}
@Override
protected void onCreate(Bundle icicle, boolean ready) {
if (!getIntent().hasExtra(ContactSelectionListFragment.DISPLAY_MODE)) {
@@ -112,13 +106,6 @@ public class ShareActivity extends PassphraseRequiredActionBarActivity
initializeMedia();
}
@Override
public void onResume() {
Log.i(TAG, "onResume()");
super.onResume();
dynamicLanguage.onResume(this);
}
@Override
public void onPause() {
super.onPause();
@@ -291,7 +278,7 @@ public class ShareActivity extends PassphraseRequiredActionBarActivity
InputStream inputStream;
if ("file".equals(uris[0].getScheme())) {
inputStream = openFileUri(uris[0]);
inputStream = new FileInputStream(uris[0].getPath());
} else {
inputStream = context.getContentResolver().openInputStream(uris[0]);
}
@@ -333,18 +320,5 @@ public class ShareActivity extends PassphraseRequiredActionBarActivity
resolvedExtra = uri;
handleResolvedMedia(getIntent(), true);
}
private InputStream openFileUri(Uri uri) throws IOException {
FileInputStream fin = new FileInputStream(uri.getPath());
// TODO: Remove the commented code if there are no issues with reading shared files by October 2020
// int owner = FileUtils.getFileDescriptorOwner(fin.getFD());
// if (owner == -1 || owner == Process.myUid()) {
// fin.close();
// throw new IOException("File owned by application");
// }
return fin;
}
}
}