This commit is contained in:
Phil Ringnalda 2016-06-10 18:47:45 -07:00
Родитель 05bf436edd ff5673acd6
Коммит 4ebe1d3553
3 изменённых файлов: 1 добавлений и 24 удалений

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

@ -3325,14 +3325,7 @@ public class BrowserApp extends GeckoApp
if (shareIntent == null) { if (shareIntent == null) {
shareIntent = new Intent(Intent.ACTION_SEND); shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setType("text/plain"); shareIntent.setType("text/plain");
provider.setIntent(shareIntent);
final Intent intentToSet = shareIntent;
ThreadUtils.postToBackgroundThread(new Runnable() {
@Override
public void run() {
provider.setIntent(intentToSet);
}
});
} }
// Replace the existing intent's extras // Replace the existing intent's extras

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

@ -4,9 +4,7 @@
package org.mozilla.gecko.db; package org.mozilla.gecko.db;
import org.mozilla.gecko.AppConstants;
import org.mozilla.gecko.annotation.RobocopTarget; import org.mozilla.gecko.annotation.RobocopTarget;
import org.mozilla.gecko.util.ThreadUtils;
import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper; import android.database.sqlite.SQLiteOpenHelper;
@ -37,10 +35,6 @@ public abstract class AbstractPerProfileDatabaseProvider extends AbstractTransac
*/ */
@Override @Override
protected SQLiteDatabase getReadableDatabase(Uri uri) { protected SQLiteDatabase getReadableDatabase(Uri uri) {
if (!AppConstants.MOZILLA_OFFICIAL) {
ThreadUtils.assertNotOnUiThread();
}
String profile = null; String profile = null;
if (uri != null) { if (uri != null) {
profile = uri.getQueryParameter(BrowserContract.PARAM_PROFILE); profile = uri.getQueryParameter(BrowserContract.PARAM_PROFILE);
@ -59,10 +53,6 @@ public abstract class AbstractPerProfileDatabaseProvider extends AbstractTransac
*/ */
@Override @Override
protected SQLiteDatabase getWritableDatabase(Uri uri) { protected SQLiteDatabase getWritableDatabase(Uri uri) {
if (!AppConstants.MOZILLA_OFFICIAL) {
ThreadUtils.assertNotOnUiThread();
}
String profile = null; String profile = null;
if (uri != null) { if (uri != null) {
profile = uri.getQueryParameter(BrowserContract.PARAM_PROFILE); profile = uri.getQueryParameter(BrowserContract.PARAM_PROFILE);

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

@ -195,12 +195,6 @@ public class GeckoActionProvider {
return dataModel.getIntent(); return dataModel.getIntent();
} }
/**
* Must be run on a background thread due to DB access.
*
* DB access happens in ActivityChosseModel when it retrieves the list of sync clients
* if sync is enabled.
*/
public void setIntent(Intent intent) { public void setIntent(Intent intent) {
ActivityChooserModel dataModel = ActivityChooserModel.get(mContext, mHistoryFileName); ActivityChooserModel dataModel = ActivityChooserModel.get(mContext, mHistoryFileName);
dataModel.setIntent(intent); dataModel.setIntent(intent);