Bug 1157949 : Open tabs panel when opening tab queue when Fx opened via the launcher icon (r=mcomella)

--HG--
extra : rebase_source : f600a616eb664f991835dae71eef0c9ae43be484
extra : amend_source : 86dfeaf12837692c81ae04472299eaac9db104d8
This commit is contained in:
Martyn Haigh 2015-04-28 12:23:15 +01:00
Родитель 712f3f3e35 578bacf10d
Коммит b60abed0f9
1 изменённых файлов: 19 добавлений и 13 удалений

Просмотреть файл

@ -918,13 +918,30 @@ public class BrowserApp extends GeckoApp
@Override
public void run() {
if (TabQueueHelper.shouldOpenTabQueueUrls(BrowserApp.this)) {
TabQueueHelper.openQueuedUrls(BrowserApp.this, mProfile, TabQueueHelper.FILE_NAME, false);
openQueuedTabs();
}
}
});
}
}
private void openQueuedTabs() {
ThreadUtils.assertNotOnUiThread();
int queuedTabCount = TabQueueHelper.getTabQueueLength(BrowserApp.this);
TabQueueHelper.openQueuedUrls(BrowserApp.this, mProfile, TabQueueHelper.FILE_NAME, false);
// If there's more than one tab then also show the tabs panel.
if (queuedTabCount > 1) {
ThreadUtils.postToUiThread(new Runnable() {
@Override
public void run() {
showNormalTabs();
}
});
}
}
@Override
public void onResume() {
super.onResume();
@ -3423,18 +3440,7 @@ public class BrowserApp extends GeckoApp
ThreadUtils.postToBackgroundThread(new Runnable() {
@Override
public void run() {
int queuedTabCount = TabQueueHelper.getTabQueueLength(BrowserApp.this);
TabQueueHelper.openQueuedUrls(BrowserApp.this, mProfile, TabQueueHelper.FILE_NAME, false);
// If there's more than one tab then also show the tabs panel.
if (queuedTabCount > 1) {
ThreadUtils.postToUiThread(new Runnable() {
@Override
public void run() {
showNormalTabs();
}
});
}
openQueuedTabs();
}
});
}