mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1243931 - Use Context.getPackageName() instead of AppConstants.ANDROID_PACKAGE_NAME. r=nalexander
This patch just modifies the search widget to use the Android Context function instead of the hard-coded (at compile time) value.
This commit is contained in:
parent
a7859ae4f3
commit
622fcfe878
@ -134,7 +134,7 @@ public class PostSearchFragment extends Fragment {
|
||||
|
||||
// If the intent URI didn't specify a package, open this in Fennec.
|
||||
if (i.getPackage() == null) {
|
||||
i.setClassName(AppConstants.ANDROID_PACKAGE_NAME, AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS);
|
||||
i.setClassName(view.getContext().getPackageName(), AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS);
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL,
|
||||
TelemetryContract.Method.CONTENT, "search-result");
|
||||
} else {
|
||||
|
@ -67,7 +67,7 @@ public class SearchWidget extends AppWidgetProvider {
|
||||
switch (intent.getAction()) {
|
||||
case ACTION_LAUNCH_BROWSER:
|
||||
redirect = buildRedirectIntent(Intent.ACTION_MAIN,
|
||||
AppConstants.ANDROID_PACKAGE_NAME,
|
||||
context.getPackageName(),
|
||||
AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS,
|
||||
intent);
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.LAUNCH,
|
||||
@ -75,7 +75,7 @@ public class SearchWidget extends AppWidgetProvider {
|
||||
break;
|
||||
case ACTION_LAUNCH_NEW_TAB:
|
||||
redirect = buildRedirectIntent(Intent.ACTION_VIEW,
|
||||
AppConstants.ANDROID_PACKAGE_NAME,
|
||||
context.getPackageName(),
|
||||
AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS,
|
||||
intent);
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.LAUNCH,
|
||||
@ -83,7 +83,7 @@ public class SearchWidget extends AppWidgetProvider {
|
||||
break;
|
||||
case ACTION_LAUNCH_SEARCH:
|
||||
redirect = buildRedirectIntent(Intent.ACTION_VIEW,
|
||||
AppConstants.ANDROID_PACKAGE_NAME,
|
||||
context.getPackageName(),
|
||||
AppConstants.MOZ_ANDROID_SEARCH_INTENT_CLASS,
|
||||
intent);
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.LAUNCH,
|
||||
|
Loading…
Reference in New Issue
Block a user