mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 825505 - Allow cancelling pinning sites from the Awesomescreen. r=mfinkle
This commit is contained in:
parent
bc1410bc83
commit
f5966d3f6d
@ -24,6 +24,7 @@ import org.json.JSONObject;
|
||||
import android.accounts.Account;
|
||||
import android.accounts.AccountManager;
|
||||
import android.accounts.OnAccountsUpdateListener;
|
||||
import android.app.Activity;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -980,6 +981,9 @@ public class AboutHomeContent extends ScrollView
|
||||
|
||||
int requestCode = GeckoAppShell.sActivityHelper.makeRequestCode(new ActivityResultHandler() {
|
||||
public void onActivityResult(int resultCode, Intent data) {
|
||||
if (resultCode == Activity.RESULT_CANCELED || data == null)
|
||||
return;
|
||||
|
||||
final String title = data.getStringExtra(AwesomeBar.TITLE_KEY);
|
||||
final String url = data.getStringExtra(AwesomeBar.URL_KEY);
|
||||
|
||||
@ -988,7 +992,6 @@ public class AboutHomeContent extends ScrollView
|
||||
@Override
|
||||
public Void doInBackground(Void... params) {
|
||||
final ContentResolver resolver = mActivity.getContentResolver();
|
||||
Log.i(LOGTAG, "Pin : " + url + " and " + title);
|
||||
BrowserDB.pinSite(resolver, url, (title == null ? url : title), position);
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user