зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1243307 - Post: convert AsyncTask to ThreadUtils.postToBackgroundThread r=liuche
--HG-- extra : commitid : HDD66YuzRIA
This commit is contained in:
Родитель
39666217d2
Коммит
970113dc9f
|
@ -1306,13 +1306,13 @@ public class BrowserApp extends GeckoApp
|
|||
return true;
|
||||
}
|
||||
|
||||
new AsyncTask<Void, Void, Void>() {
|
||||
ThreadUtils.postToBackgroundThread(new Runnable() {
|
||||
@Override
|
||||
protected Void doInBackground(Void... voids) {
|
||||
public void run() {
|
||||
GeckoAppShell.createShortcut(title, url);
|
||||
return null;
|
||||
|
||||
}
|
||||
}.execute();
|
||||
});
|
||||
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.ACTION, TelemetryContract.Method.CONTEXT_MENU,
|
||||
getResources().getResourceEntryName(itemId));
|
||||
|
|
|
@ -221,13 +221,14 @@ public abstract class HomeFragment extends Fragment {
|
|||
|
||||
// Fetch an icon big enough for use as a home screen icon.
|
||||
final String displayTitle = info.getDisplayTitle();
|
||||
new AsyncTask<Void, Void, Void>() {
|
||||
ThreadUtils.postToBackgroundThread(new Runnable() {
|
||||
@Override
|
||||
protected Void doInBackground(Void... voids) {
|
||||
public void run() {
|
||||
GeckoAppShell.createShortcut(displayTitle, info.url);
|
||||
return null;
|
||||
|
||||
}
|
||||
}.execute();
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче