MCPcopy Create free account
hub / github.com/buggins/coolreader / onNewIntent

Method onNewIntent

android/src/org/coolreader/CoolReader.java:957–984  ·  view source on GitHub ↗
(Intent intent)

Source from the content-addressed store, hash-verified

955 }
956
957 @Override
958 protected void onNewIntent(Intent intent) {
959 log.i("onNewIntent : " + intent);
960 if ( mDestroyed ) {
961 log.e("engine is already destroyed");
962 return;
963 }
964 String fileToOpen = null;
965 if ( Intent.ACTION_VIEW.equals(intent.getAction()) ) {
966 Uri uri = intent.getData();
967 if ( uri!=null ) {
968 fileToOpen = extractFileName(uri);
969 }
970 intent.setData(null);
971 }
972 log.v("onNewIntent, fileToOpen=" + fileToOpen);
973 if ( fileToOpen!=null ) {
974 // load document
975 final String fn = fileToOpen;
976 mReaderView.loadDocument(fileToOpen, new Runnable() {
977 public void run() {
978 log.v("onNewIntent, loadDocument error handler called");
979 showToast("Error occured while loading " + fn);
980 mEngine.hideProgress();
981 }
982 });
983 }
984 }
985
986 private boolean mPaused = false;
987 public boolean isPaused() {

Callers

nothing calls this directly

Calls 8

extractFileNameMethod · 0.95
iMethod · 0.65
eMethod · 0.65
vMethod · 0.65
equalsMethod · 0.45
getDataMethod · 0.45
setDataMethod · 0.45
loadDocumentMethod · 0.45

Tested by

no test coverage detected