|
|
@ -112,11 +112,11 @@ public class TabsManager { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String dataString = null; |
|
|
|
String url = null; |
|
|
|
if (intent != null) { |
|
|
|
if (intent != null) { |
|
|
|
dataString = intent.getDataString(); |
|
|
|
url = intent.getDataString(); |
|
|
|
} |
|
|
|
} |
|
|
|
final String url = dataString; |
|
|
|
Log.d(TAG, "URL from intent: " + url); |
|
|
|
mCurrentTab = null; |
|
|
|
mCurrentTab = null; |
|
|
|
if (mPreferenceManager.getRestoreLostTabsEnabled()) { |
|
|
|
if (mPreferenceManager.getRestoreLostTabsEnabled()) { |
|
|
|
restoreLostTabs(url, activity, subscriber); |
|
|
|
restoreLostTabs(url, activity, subscriber); |
|
|
@ -130,8 +130,8 @@ public class TabsManager { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void restoreLostTabs(final String url, final Activity activity, |
|
|
|
private void restoreLostTabs(@Nullable final String url, @NonNull final Activity activity, |
|
|
|
final Subscriber subscriber) { |
|
|
|
@NonNull final Subscriber subscriber) { |
|
|
|
restoreState().subscribeOn(Schedulers.worker()) |
|
|
|
restoreState().subscribeOn(Schedulers.worker()) |
|
|
|
.observeOn(Schedulers.main()).subscribe(new OnSubscribe<Bundle>() { |
|
|
|
.observeOn(Schedulers.main()).subscribe(new OnSubscribe<Bundle>() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -212,6 +212,7 @@ public class TabsManager { |
|
|
|
tab.onDestroy(); |
|
|
|
tab.onDestroy(); |
|
|
|
} |
|
|
|
} |
|
|
|
mTabList.clear(); |
|
|
|
mTabList.clear(); |
|
|
|
|
|
|
|
mIsInitialized = false; |
|
|
|
mCurrentTab = null; |
|
|
|
mCurrentTab = null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -393,6 +394,7 @@ public class TabsManager { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
FileUtils.deleteBundleInStorage(mApp, BUNDLE_STORAGE); |
|
|
|
subscriber.onComplete(); |
|
|
|
subscriber.onComplete(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|