正在查看: Petal Maps v4.7.0.310001 应用的 a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Petal Maps v4.7.0.310001 应用的 a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.huawei.maps.app.petalmaps;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Point;
import android.graphics.drawable.Drawable;
import android.hardware.Sensor;
import android.hardware.SensorManager;
import android.location.Location;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Process;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewStub;
import android.widget.FrameLayout;
import android.widget.PopupWindow;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.widget.NestedScrollView;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;
import androidx.databinding.ViewStubProxy;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.navigation.fragment.NavHostFragment;
import com.airbnb.lottie.LottieAnimationView;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.badge.BadgeDrawable;
import com.huawei.hms.navi.navibase.model.MapNaviPath;
import com.huawei.hms.navi.navibase.model.MapNaviStaticInfo;
import com.huawei.map.databus.annotation.DataBus;
import com.huawei.map.mapapi.CameraUpdateFactory;
import com.huawei.map.mapapi.HWMap;
import com.huawei.map.mapapi.Projection;
import com.huawei.map.mapapi.model.CameraPosition;
import com.huawei.map.mapapi.model.LaneGuide;
import com.huawei.map.mapapi.model.LatLng;
import com.huawei.map.mapapi.model.LatLngBounds;
import com.huawei.maps.app.R;
import com.huawei.maps.app.addressdetail.ui.AddressAskingDialogFragment;
import com.huawei.maps.app.common.commonui.CustomHwBottomNavigationView;
import com.huawei.maps.app.common.location.LocationHelper;
import com.huawei.maps.app.databinding.ActivityPetalMapsBinding;
import com.huawei.maps.app.databinding.FragmentDriveNavBinding;
import com.huawei.maps.app.databinding.HomeSlideLayoutBinding;
import com.huawei.maps.app.databinding.LayoutAddReminderBinding;
import com.huawei.maps.app.databinding.LayoutIndoorSwitchViewBinding;
import com.huawei.maps.app.databinding.LocationPermissionDialogBinding;
import com.huawei.maps.app.databinding.PetalMapsChildViewBinding;
import com.huawei.maps.app.databinding.PetalMapsNavLayoutBinding;
import com.huawei.maps.app.databinding.PetalMapsOtherViewBinding;
import com.huawei.maps.app.databinding.PetalMapsToolbarBinding;
import com.huawei.maps.app.databinding.RecordsLayoutBinding;
import com.huawei.maps.app.databinding.SearchHistoryInExploreBinding;
import com.huawei.maps.app.databinding.TeamMapsFragmentLocationPrivacyBinding;
import com.huawei.maps.app.databinding.TeamMemberListLayoutBinding;
import com.huawei.maps.app.databinding.TeamSettingTypeDialogLayoutBinding;
import com.huawei.maps.app.fastcard.ui.main.QiblaFragment;
import com.huawei.maps.app.navigation.bean.NavigationRoadFeedbackInfo;
import com.huawei.maps.app.navigation.enums.NewRoadFeedbackType;
import com.huawei.maps.app.navigation.fragment.CruiseNavFragment;
import com.huawei.maps.app.navigation.fragment.NavCommuteFragment;
import com.huawei.maps.app.navigation.fragment.NavFragment;
import com.huawei.maps.app.navigation.fragment.NaviCompletedBottomSheetFragment;
import com.huawei.maps.app.navigation.fragment.NaviCompletedNonDriveFragment;
import com.huawei.maps.app.navigation.helper.DriveNavHelper;
import com.huawei.maps.app.navigation.model.NewRoadFeedBackInfo;
import com.huawei.maps.app.navigation.utils.NavPopEventHelper;
import com.huawei.maps.app.navigation.viewmodel.NewRoadFeedbackViewModel;
import com.huawei.maps.app.operation.ui.OperationFragment;
import com.huawei.maps.app.operation.ui.TopOperationFragment;
import com.huawei.maps.app.petalmaps.IPatelMapsView;
import com.huawei.maps.app.petalmaps.PetalMapsActivity;
import com.huawei.maps.app.petalmaps.a;
import com.huawei.maps.app.petalmaps.bean.CommonH5Bean;
import com.huawei.maps.app.petalmaps.covid.COVIDFragment;
import com.huawei.maps.app.petalmaps.thirdsource.CommonH5Fragment;
import com.huawei.maps.app.petalmaps.tips.MapTipsShowHelperV2;
import com.huawei.maps.app.petalmaps.trafficevent.TrafficEventDetailMainFragment;
import com.huawei.maps.app.petalmaps.trafficevent.TrafficEventPushFragment;
import com.huawei.maps.app.petalmaps.viewmode.ActivityViewModel;
import com.huawei.maps.app.petalmaps.weather.WeatherBadgeView;
import com.huawei.maps.app.routeplan.ui.bean.TicketErrorInfo;
import com.huawei.maps.app.routeplan.ui.fragment.ServiceAreaInfoFragment;
import com.huawei.maps.app.routeplan.util.RouteNavUtil;
import com.huawei.maps.app.search.helper.AlongSearchHelper;
import com.huawei.maps.app.search.ui.launch.BaseHistoryFragment;
import com.huawei.maps.app.search.ui.launch.ExploreHomeFragment;
import com.huawei.maps.app.search.ui.result.AllFilterFragment;
import com.huawei.maps.app.search.ui.result.MultiFilterFragment;
import com.huawei.maps.app.search.ui.result.SearchResultFragment;
import com.huawei.maps.app.search.ui.selectpoint.SelectPointFragment;
import com.huawei.maps.app.search.viewmodel.ExploreViewModel;
import com.huawei.maps.app.setting.constant.RoadReportType;
import com.huawei.maps.app.setting.ui.fragment.settings.LanguageFragment;
import com.huawei.maps.app.setting.ui.fragment.settings.LanguageNaviSettingFragment;
import com.huawei.maps.app.setting.ui.fragment.team.TeamMapDestinationDetailFragment;
import com.huawei.maps.app.setting.ui.fragment.team.TeamMapDestinationInfoByMemberFragment;
import com.huawei.maps.app.setting.ui.fragment.team.TeamMapMemberInfoFragment;
import com.huawei.maps.app.setting.ui.fragment.team.TeamMapTeamDetailFragment;
import com.huawei.maps.app.setting.viewmodel.TeamMapBottomViewModel;
import com.huawei.maps.app.slidingcontainer.fragment.AlongSearchInfoFragment;
import com.huawei.maps.app.slidingcontainer.fragment.AspiegelLocationFragment;
import com.huawei.maps.app.slidingcontainer.fragment.LayerSettingFragment;
import com.huawei.maps.app.slidingcontainer.fragment.PlanStrategyFragment;
import com.huawei.maps.app.slidingcontainer.fragment.ScooterAndBikeDetailFragment;
import com.huawei.maps.app.slidingcontainer.manager.SlidingContainerManager;
import com.huawei.maps.app.tools.satellite.ui.SatelliteOverviewFragment;
import com.huawei.maps.app.ugc.presentation.roadcondition.RoadConditionDetailSelectFragment;
import com.huawei.maps.app.ugc.presentation.roadcondition.RoadConditionSelectFragment;
import com.huawei.maps.app.ugcrealtimedisplay.viewmodel.UGCRealTimeDisplayViewModel;
import com.huawei.maps.app.videomap.ui.VideoMapFragment;
import com.huawei.maps.businessbase.bean.AchievementInfo;
import com.huawei.maps.businessbase.bean.NavCompleteInfo;
import com.huawei.maps.businessbase.bean.ThemeStyleInfoBean;
import com.huawei.maps.businessbase.database.config.MapConfigDataTools;
import com.huawei.maps.businessbase.dynamic.callback.DynamicCardCallBack;
import com.huawei.maps.businessbase.listener.AnimateCallback;
import com.huawei.maps.businessbase.listener.OnSettingsWirelessBackListener;
import com.huawei.maps.businessbase.listener.SaveBadgeShareDialogListener;
import com.huawei.maps.businessbase.listener.SimpleListener;
import com.huawei.maps.businessbase.manager.AbstractMapUIController;
import com.huawei.maps.businessbase.manager.MapHelper;
import com.huawei.maps.businessbase.manager.routeplan.RouteDataManager;
import com.huawei.maps.businessbase.manager.tile.MapStyleSettingManager;
import com.huawei.maps.businessbase.model.NaviCurRecord;
import com.huawei.maps.businessbase.model.Site;
import com.huawei.maps.businessbase.model.filters.SearchResultFilterClassify;
import com.huawei.maps.businessbase.model.location.MapLocationStatus;
import com.huawei.maps.businessbase.model.micromobility.MicroMobilityCommonItem;
import com.huawei.maps.businessbase.model.navigation.MapDrivingInfo;
import com.huawei.maps.businessbase.model.trafficevent.TrafficEventInfo;
import com.huawei.maps.businessbase.network.NetworkConstant;
import com.huawei.maps.businessbase.report.MapDevOpsReport;
import com.huawei.maps.businessbase.retrievalservice.bean.WebViewData;
import com.huawei.maps.businessbase.servicepermission.ServicePermission;
import com.huawei.maps.businessbase.servicepermission.helper.AppPermissionHelper;
import com.huawei.maps.businessbase.team.bean.TeamMemberSiteInfo;
import com.huawei.maps.businessbase.ui.BaseActivity;
import com.huawei.maps.businessbase.ui.BaseFragment;
import com.huawei.maps.businessbase.utils.PathPlanStrategyUtil;
import com.huawei.maps.businessbase.utils.PermissionsUtil;
import com.huawei.maps.businessbase.viewmodel.CommonAddressRecordsViewModel;
import com.huawei.maps.businessbase.viewmodel.LocationMarkerViewModel;
import com.huawei.maps.businessbase.viewmodel.RouteRefreshViewModel;
import com.huawei.maps.commonui.model.ScreenDisplayStatus;
import com.huawei.maps.commonui.view.MapButton;
import com.huawei.maps.commonui.view.MapCustomBubbleLayout;
import com.huawei.maps.commonui.view.MapImageButton;
import com.huawei.maps.commonui.view.MapImageView;
import com.huawei.maps.commonui.view.MapRecyclerView;
import com.huawei.maps.commonui.view.MapScrollLayout;
import com.huawei.maps.commonui.view.dialog.AlertDialogRunnable;
import com.huawei.maps.commonui.view.dialog.MapAlertDialog;
import com.huawei.maps.commonui.view.slideview.SlideView;
import com.huawei.maps.locationshare.ui.ShareLocationCreateOnNaviFragment;
import com.huawei.maps.navi.viewmodel.NaviViewModel;
import com.huawei.maps.poi.databinding.DialogRewardBinding;
import com.huawei.maps.poi.ui.DetailFragment;
import com.huawei.maps.poi.utils.DetailReportUtil;
import com.huawei.maps.poi.viewmodel.BottomViewModel;
import com.huawei.maps.privacy.activity.PrivacyDeclareDetailsActivity;
import com.huawei.maps.privacy.agreement.AgreementRequestHelper;
import com.huawei.maps.route.model.RouteEventBean;
import com.huawei.maps.share.ui.ShareBottomSheetFragment;
import com.huawei.maps.team.utils.TeamMapUtils;
import com.huawei.secure.android.common.intent.IntentUtils;
import com.huawei.secure.android.common.intent.SafeBundle;
import com.huawei.secure.android.common.intent.SafeIntent;
import com.huawei.uikit.hwcolumnsystem.widget.HwColumnSystem;
import defpackage.a06;
import defpackage.ap6;
import defpackage.b55;
import defpackage.br8;
import defpackage.c31;
import defpackage.cq5;
import defpackage.db5;
import defpackage.eq5;
import defpackage.fo7;
import defpackage.gn4;
import defpackage.hp5;
import defpackage.hr8;
import defpackage.kw5;
import defpackage.l36;
import defpackage.n5;
import defpackage.np6;
import defpackage.nu9;
import defpackage.nx6;
import defpackage.ow6;
import defpackage.ox6;
import defpackage.qd2;
import defpackage.u04;
import defpackage.ub1;
import defpackage.vz8;
import defpackage.x59;
import defpackage.x9;
import defpackage.yta;
import defpackage.zb3;
import java.math.BigDecimal;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Currency;
import java.util.List;
import java.util.Locale;
import java.util.Optional;
import java.util.Stack;
import java.util.function.Consumer;
import kotlin.jvm.functions.Function0;
import org.jetbrains.annotations.NotNull;
public class a extends AbstractMapUIController {
public static volatile a B0;
public NavFragment A;
public CruiseNavFragment B;
public COVIDFragment C;
public MultiFilterFragment D;
public BaseFragment E;
public String F;
public DynamicCardCallBack H;
public AchievementInfo I;
public DialogRewardBinding J;
public String K;
public NaviCompletedBottomSheetFragment M;
public NaviCompletedNonDriveFragment N;
public NavCommuteFragment O;
public boolean P;
public boolean Q;
public boolean R;
public boolean S;
public x9 T;
public boolean U;
public boolean V;
public volatile CameraPosition W;
public LatLngBounds X;
public Activity Z;
public boolean a;
public MapAlertDialog a0;
public DialogInterface.OnClickListener b0;
public boolean c0;
public boolean d;
public boolean d0;
public boolean e;
public boolean f;
public Runnable f0;
public LocationPermissionDialogBinding g0;
public int h;
public PopupWindow h0;
public volatile BadgeDrawable i0;
public MapAlertDialog k;
public LayoutIndoorSwitchViewBinding k0;
public MapAlertDialog l;
public com.huawei.maps.app.setting.ui.fragment.team.a m;
public PetalMapsOtherViewBinding m0;
public ShareBottomSheetFragment n;
public PetalMapsChildViewBinding n0;
public PetalMapsToolbarBinding o0;
public PetalMapsNavLayoutBinding p0;
public TeamMapBottomViewModel q;
public TeamMemberListLayoutBinding q0;
public View r;
public HomeSlideLayoutBinding r0;
public View s;
public boolean s0;
public View t;
public int t0;
public ScreenDisplayStatus u;
public LayoutAddReminderBinding u0;
public HwColumnSystem v;
public BottomViewModel w;
public ActivityViewModel x;
public NewRoadFeedbackViewModel y;
public UGCRealTimeDisplayViewModel z;
public static final Drawable y0 = o41.e(R.drawable.hos_ic_slide_theme);
public static final Drawable z0 = o41.e(R.drawable.hos_ic_slide);
public static final int A0 = o41.b().getResources().getDimensionPixelSize(R.dimen.dp_10);
public boolean b = false;
public int c = BaseHistoryFragment.MAX_SUG_LENGTH;
public Runnable g = new Runnable() {
@Override
public final void run() {
a.this.s3();
}
};
public boolean i = true;
public MapLocationStatus j = MapLocationStatus.DEFAULT;
public TeamSettingTypeDialogLayoutBinding o = null;
public TeamMapsFragmentLocationPrivacyBinding p = null;
public Stack<String> G = new Stack<>();
public int L = 0;
public boolean Y = true;
public boolean e0 = false;
public boolean j0 = false;
public ActivityPetalMapsBinding l0 = b55.c().a();
public boolean v0 = false;
public boolean w0 = false;
public int x0 = 0;
public class RunnableC0006a implements Runnable {
public final boolean a;
public RunnableC0006a(boolean z) {
this.a = z;
}
@Override
public void run() {
if (a.this.o0 != null) {
a.this.o0.setIsPetalLogoVisible(this.a);
a.this.setIsNavinfoLogoVisible();
}
}
}
public class b implements Runnable {
public b() {
}
@Override
public void run() {
if (a.this.o0 != null) {
if (MapHelper.F2().f4()) {
boolean l = gn4.i().l();
hm4.p("MapUIController", "set value: " + l);
a.this.o0.setIsNavinfoLogoVisible(l);
} else {
hm4.p("MapUIController", "set false");
a.this.o0.setIsNavinfoLogoVisible(false);
}
a.this.x0();
}
}
}
public class c implements AnimateCallback {
public c() {
}
public void onCancel() {
hm4.f("MapUIController", "viewMap onFinish: ");
}
public void onFinish() {
hm4.f("MapUIController", "viewMap onFinish: ");
}
}
public class d implements DialogInterface.OnClickListener {
public final int a;
public final FragmentActivity b;
public d(int i, FragmentActivity fragmentActivity) {
this.a = i;
this.b = fragmentActivity;
}
@Override
public void onClick(DialogInterface dialogInterface, int i) {
int i2 = this.a;
if (i2 == 1) {
IntentUtils.safeStartActivityForResultStatic(this.b, new SafeIntent(new Intent("android.settings.LOCATION_SOURCE_SETTINGS")), 111);
return;
}
if (i2 == 2) {
if (ServicePermission.getOperationType() == NetworkConstant.OperationType.ASPIEGEL.ordinal()) {
a.x1().g6(this.b);
return;
} else {
PermissionsUtil.F(this.b);
return;
}
}
if (i2 != 3) {
return;
}
SafeIntent safeIntent = new SafeIntent(new Intent("android.settings.APPLICATION_DETAILS_SETTINGS"));
safeIntent.setData(Uri.fromParts("package", "com.huawei.hwid", null));
IntentUtils.safeStartActivityForResultStatic(this.b, safeIntent, 111);
}
}
public class e implements Runnable {
public final int a;
public e(int i) {
this.a = i;
}
@Override
public void run() {
a.this.U0(this.a);
}
}
public class f implements Runnable {
public final boolean a;
public f(boolean z) {
this.a = z;
}
@Override
public void run() {
boolean z = a.this.l0 == null || a.this.o0 == null;
boolean z2 = c06.g() || c06.b() || SlidingContainerManager.d().i();
boolean z3 = a.this.B != null || a.this.P || a.this.Q;
if (z || z2 || z3 || a.this.o0.naviinfoLogo.getVisibility() == 0) {
return;
}
a.this.F0();
if (!w59.a.F()) {
MapImageView mapImageView = a.this.o0.logo;
MapImageView mapImageView2 = a.this.o0.logoDrawingNo;
if (AppPermissionHelper.isChinaOperationTypeWithoutAccount() && this.a) {
mapImageView2.setVisibility(0);
mapImageView.setVisibility(8);
} else {
mapImageView.setVisibility(0);
mapImageView2.setVisibility(8);
}
gn4.i().s(true);
}
if (a.this.o0.naviinfoLogo.getVisibility() == 0) {
if (a.this.o0.logo.getVisibility() == 0 || a.this.o0.logoDrawingNo.getVisibility() == 0) {
a.this.o0.naviinfoLogo.setVisibility(8);
}
}
}
}
public class g implements MapConfigDataTools.DbCallBackObj<String> {
public g() {
}
public void setObject(String str) {
if (str == null) {
au4.a().e(o41.c(), false);
return;
}
p19.F().z2(str);
MapStyleSettingManager.e().a(MapStyleSettingManager.l() ? 1 : 0);
au4.a().e(o41.c(), "Y".equals(str));
}
}
public class h implements Runnable {
public h() {
}
@Override
public void run() {
a.this.F0();
if (a.this.o0 == null) {
return;
}
a.this.setLocationImageMarginBottom(a.this.o0.getRestrictedRouteTipsMargin() - o41.a(o41.c(), 12));
}
}
public static class i {
public static final int[] a;
public static final int[] b;
static {
int[] iArr = new int[MapLocationStatus.values().length];
b = iArr;
try {
iArr[MapLocationStatus.COMPASS.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
b[MapLocationStatus.COMPASS_HIGHLIGHT.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
b[MapLocationStatus.DEFAULT.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
b[MapLocationStatus.ERROR.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
b[MapLocationStatus.DEFAULT_HIGHLIGHT.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
int[] iArr2 = new int[ScreenDisplayStatus.values().length];
a = iArr2;
try {
iArr2[ScreenDisplayStatus.NORMAL_AND_PORTRAIT.ordinal()] = 1;
} catch (NoSuchFieldError unused6) {
}
try {
a[ScreenDisplayStatus.PAD_AND_PORTRAIT.ordinal()] = 2;
} catch (NoSuchFieldError unused7) {
}
try {
a[ScreenDisplayStatus.NORMAL_AND_LANDSCAPE.ordinal()] = 3;
} catch (NoSuchFieldError unused8) {
}
try {
a[ScreenDisplayStatus.MATAX_AND_TAHITI_AND_LANDSCAPE.ordinal()] = 4;
} catch (NoSuchFieldError unused9) {
}
try {
a[ScreenDisplayStatus.MATAX_AND_TAHITI_AND_PORTRAIT.ordinal()] = 5;
} catch (NoSuchFieldError unused10) {
}
try {
a[ScreenDisplayStatus.PAD_AND_LANDSCAPE.ordinal()] = 6;
} catch (NoSuchFieldError unused11) {
}
}
}
public static class j implements MapConfigDataTools.DbCallBackObj<Boolean> {
public static void b() {
boolean b = p79.b("hicar_first_run", true, o41.c());
if (yl3.e() && b) {
a.x1().r4();
p79.g("hicar_first_run", false, o41.c());
}
}
public void setObject(Boolean bool) {
if (bool == null || !bool.booleanValue()) {
fk2.f(new Runnable() {
@Override
public final void run() {
a.j.b();
}
});
au4.a().d(o41.c(), false);
return;
}
a.x1().Y1(bool.booleanValue());
MapHelper.F2().h7(bool.booleanValue(), false);
MapHelper.F2().n6();
MapStyleSettingManager.e().a(MapStyleSettingManager.l() ? 1 : 0);
au4.a().d(o41.c(), true);
}
public j() {
}
}
public a() {
super.setInstance(this);
}
@DataBus(dataBusName = "app_map_ui_controller_init_dynamic_operate_data")
public static void O6(boolean z) {
x1().y2(z);
}
@DataBus(dataBusName = "app_map_ui_controller_show_weather_badge")
public static void P6() {
x1().showWeatherBadge();
}
public static void R3(ActivityViewModel activityViewModel) {
activityViewModel.F.postValue(Boolean.FALSE);
}
@DataBus(dataBusName = "app_map_ui_controller_change_to_navi_share_dialog")
public static void V0() {
int b2;
int l;
Context c2 = o41.c();
int b3 = ct3.b(c2, 0.0f);
int b4 = ct3.b(c2, 0.0f);
if (ct3.A(o41.c()) == ScreenDisplayStatus.PAD_AND_LANDSCAPE || ct3.R()) {
b2 = ct3.b(c2, 0.0f) + (ct3.l(o41.c()) / 2);
l = ((ct3.l(o41.c()) / 2) - ct3.b(c2, 150.0f)) / 2;
} else {
b2 = ct3.b(c2, 0.0f);
l = (ct3.l(o41.c()) - ct3.b(c2, 400.0f)) / 2;
}
hm4.f("MapUIController", " padding in dp: left: " + ct3.f0(c2, b3) + " top: " + ct3.f0(c2, l) + " right: " + ct3.f0(c2, b4) + " botton: " + ct3.f0(c2, b2));
MapHelper.F2().k1(b3, l, b4, b2);
}
public static void V3(AlertDialog alertDialog) {
((TextView) alertDialog.findViewById(android.R.id.message)).setMovementMethod(LinkMovementMethod.getInstance());
}
public static void W3(PetalMapsActivity petalMapsActivity) {
nx6.a.G(new QiblaFragment(), petalMapsActivity);
}
public static void a3(View.OnClickListener onClickListener, PetalMapsToolbarBinding petalMapsToolbarBinding) {
petalMapsToolbarBinding.petalMapsBadResultBtn.setOnClickListener(onClickListener);
}
public static void b3(View.OnClickListener onClickListener, PetalMapsToolbarBinding petalMapsToolbarBinding) {
petalMapsToolbarBinding.petalMapsBadResultBtn.setOnClickListener(onClickListener);
}
public static void c1() {
if (B0 != null) {
B0.i1();
B0.O = null;
B0.w = null;
B0.x = null;
B0.l0 = null;
B0.o0 = null;
B0.n0 = null;
B0.p0 = null;
B0.q0 = null;
B0.r0 = null;
B0.u0 = null;
B0.Z = null;
B0.T = null;
B0.y = null;
B0.m0 = null;
B0.z = null;
B0.q = null;
B0.k0 = null;
B0 = null;
}
}
public static void d3(PopupWindow popupWindow) {
if (popupWindow.isShowing()) {
popupWindow.dismiss();
}
}
public static void e3(ActivityViewModel activityViewModel) {
activityViewModel.F.postValue(Boolean.TRUE);
}
public static void h3(ActivityViewModel activityViewModel) {
activityViewModel.F.postValue(Boolean.TRUE);
}
public static void h4(ActivityViewModel activityViewModel) {
activityViewModel.F.postValue(Boolean.FALSE);
}
public static boolean i3(View view, MotionEvent motionEvent) {
return false;
}
public static void i4(PetalMapsToolbarBinding petalMapsToolbarBinding, MapCustomBubbleLayout mapCustomBubbleLayout) {
int d2 = o41.d(o9a.f() ? R.color.hos_color_toast_bg_dark : R.color.hos_color_toast_bg);
MapImageButton mapImageButton = petalMapsToolbarBinding.petalMapsBadResultBtn;
int a = o41.a(o41.c(), 24);
int a2 = o41.a(o41.c(), 22);
int bubbleRadius = mapCustomBubbleLayout.getBubbleRadius();
boolean c2 = tg5.c();
mapCustomBubbleLayout.setArrowPosition(Math.abs(((((c2 ? mapImageButton.getRight() : mapImageButton.getLeft()) + a) - (c2 ? mapCustomBubbleLayout.getRight() : mapCustomBubbleLayout.getLeft())) - bubbleRadius) - (a2 / 2)));
mapCustomBubbleLayout.setBubbleColor(d2);
}
public static void u3(PetalMapsToolbarBinding petalMapsToolbarBinding) {
petalMapsToolbarBinding.petalMapsBadResultBtn.setOnClickListener(null);
}
public static mda w3(Function0 function0) {
function0.invoke();
br8.Z(false);
return mda.a;
}
public static synchronized a x1() {
synchronized (a.class) {
if (B0 != null) {
return B0;
}
B0 = new a();
return B0;
}
}
public static void x3(final Function0 function0, String str, View view) {
br8.I(str, "detail", new Function0() {
public final Object invoke() {
mda w3;
w3 = a.w3(function0);
return w3;
}
});
}
@DataBus(dataBusName = "app_map_controller_report_ope")
public static void y4(String str) {
x1().reportOpeEvent(str);
}
public final void A0(ScreenDisplayStatus screenDisplayStatus, Activity activity) {
PetalMapsToolbarBinding petalMapsToolbarBinding;
if (this.l0 == null || this.n0 == null || (petalMapsToolbarBinding = this.o0) == null || this.p0 == null || this.m0 == null) {
return;
}
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) petalMapsToolbarBinding.routeOfflineLayout.getLayoutParams();
RelativeLayout.LayoutParams layoutParams2 = (RelativeLayout.LayoutParams) this.n0.slidingContainerScrollLayout.getLayoutParams();
CoordinatorLayout.LayoutParams layoutParams3 = this.p0.navLayout.getLayoutParams();
RelativeLayout relativeLayout = this.n0.flCallRideContainer;
CoordinatorLayout.LayoutParams layoutParams4 = (CoordinatorLayout.LayoutParams) relativeLayout.getLayoutParams();
CoordinatorLayout.LayoutParams layoutParams5 = this.m0.teamMapBottomView.teamMapBottomLayout.getLayoutParams();
MapButton mapButton = this.o0.petalMapsRoutePreference;
FrameLayout.LayoutParams layoutParams6 = (FrameLayout.LayoutParams) mapButton.getLayoutParams();
switch (i.a[screenDisplayStatus.ordinal()]) {
case 1:
case 2:
ct3.p0(this.n0.slidingContainerScrollLayout, ct3.x(activity));
ct3.p0(this.o0.routeOfflineLayout, ct3.x(activity));
ct3.p0(this.p0.bottomNav, ct3.x(activity));
ct3.p0(this.p0.navLayout, ct3.x(activity));
ct3.p0(this.m0.teamMapBottomView.teamMapBottomLayout, ct3.x(activity));
layoutParams.setMarginStart(0);
layoutParams2.setMarginStart(0);
layoutParams6.setMarginStart((int) o41.c().getResources().getDimension(R.dimen.dp_16));
mapButton.setLayoutParams(layoutParams6);
this.o0.routeOfflineLayout.setLayoutParams(layoutParams);
SlidingContainerManager.d().y(layoutParams2);
layoutParams3.setMarginStart(0);
layoutParams5.setMarginStart(0);
break;
case 3:
case 4:
case 5:
case 6:
int L = ct3.L(ct3.s(), false);
ct3.p0(this.n0.slidingContainerScrollLayout, L);
ct3.p0(this.p0.bottomNav, L);
ct3.p0(this.p0.navLayout, L);
ct3.p0(this.o0.routeOfflineLayout, L);
ct3.p0(this.m0.teamMapBottomView.teamMapBottomLayout, L);
layoutParams.setMarginStart(ct3.s().getMargin());
layoutParams2.setMarginStart(ct3.s().getMargin());
layoutParams6.setMarginStart(ct3.s().getMargin());
mapButton.setLayoutParams(layoutParams6);
this.o0.routeOfflineLayout.setLayoutParams(layoutParams);
SlidingContainerManager.d().y(layoutParams2);
layoutParams3.setMarginStart(ct3.s().getMargin());
layoutParams5.setMarginStart(ct3.s().getMargin());
ct3.p0(relativeLayout, L);
layoutParams4.setMarginStart(ct3.s().getMargin());
relativeLayout.setLayoutParams(layoutParams4);
break;
}
this.p0.navLayout.setLayoutParams(layoutParams3);
this.m0.teamMapBottomView.teamMapBottomLayout.setLayoutParams(layoutParams5);
}
public CameraPosition A1() {
return this.W;
}
public final void A2(MapNaviStaticInfo mapNaviStaticInfo) {
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding == null || this.y == null) {
return;
}
petalMapsChildViewBinding.naviCompletedOk.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
a.this.l3(view);
}
});
this.n0.naviCompletedCancel.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
a.this.m3(view);
}
});
jh8.W(false);
jh8.M(false);
NaviCompletedNonDriveFragment.NaviCompleteClickListener naviCompleteClickListener = new NaviCompletedNonDriveFragment.NaviCompleteClickListener() {
@Override
public final void onClick() {
a.this.n3();
}
};
cq5.a().e(mapNaviStaticInfo);
if (k06.r()) {
if (this.M != null) {
this.M = null;
}
this.M = new NaviCompletedBottomSheetFragment();
} else if (k06.x()) {
this.N = new NaviCompletedNonDriveFragment(naviCompleteClickListener);
}
}
public void A4() {
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding == null || this.o0 == null) {
return;
}
int openMarginBottom = homeSlideLayoutBinding.scrollPageLayout.getOpenMarginBottom();
float m = ve8.p().m();
if (m == 1.0f) {
m = 0.0f;
}
setWeatherBadgeMarginBottom((int) (openMarginBottom + ((this.r0.scrollPageLayout.getOpenMarginBottom() - this.r0.scrollPageLayout.getExitMarginBottom()) * m)));
this.o0.logoDrawingNo.setVisibility(8);
this.o0.logo.setVisibility(0);
gn4.i().s(true);
}
public void A5(boolean z) {
this.v0 = z;
}
public void A6(SearchHistoryInExploreBinding searchHistoryInExploreBinding) {
hm4.f("MapUIController", "showSearchHistoryPage");
MapHelper.F2().x1();
ve8.p().O(BaseHistoryFragment.MAX_SUG_LENGTH);
PetalMapsOtherViewBinding petalMapsOtherViewBinding = this.m0;
if (petalMapsOtherViewBinding != null) {
petalMapsOtherViewBinding.setIsShowSiteDetail(false);
}
ub1.c().e();
RecordsLayoutBinding recordsLayoutBinding = searchHistoryInExploreBinding.records;
M0(recordsLayoutBinding.mapsearchRecordsList, recordsLayoutBinding.scrollView);
ve8.p().k();
ve8.p().c();
}
public final void B0(ScreenDisplayStatus screenDisplayStatus) {
LayoutAddReminderBinding layoutAddReminderBinding;
if (this.l0 == null || (layoutAddReminderBinding = this.u0) == null) {
return;
}
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) layoutAddReminderBinding.routeNavigationLayout.getLayoutParams();
int i2 = i.a[screenDisplayStatus.ordinal()];
if (i2 == 4 || i2 == 5 || i2 == 6) {
ct3.p0(this.u0.routeNavigationLayout, ct3.L(ct3.s(), false));
layoutParams.setMarginStart(ct3.s().getMargin());
}
this.u0.setIsDark(o9a.d());
this.u0.routeNavigationLayout.setLayoutParams(layoutParams);
}
public int B1() {
if (this.o0 == null) {
return 0;
}
return ((FrameLayout.LayoutParams) this.o0.petalMapsEndBtnList.getLayoutParams()).bottomMargin - ((int) o41.c().getResources().getDimension(R.dimen.dp_12));
}
public void B2(final int i2) {
LayoutAddReminderBinding layoutAddReminderBinding = (LayoutAddReminderBinding) DataBindingUtil.inflate(LayoutInflater.from(o41.c()), R.layout.layout_add_reminder, (ViewGroup) null, false);
this.u0 = layoutAddReminderBinding;
layoutAddReminderBinding.addReminder.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
a.this.o3(i2, view);
}
});
}
public void B4() {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
petalMapsToolbarBinding.setIsTopSearchButtonVisible(false);
this.o0.searchInMapButton.setEnabled(true);
this.o0.searchLoading.setVisibility(8);
this.o0.searchInMapButton.setText(o41.f(R.string.search_in_map_button));
}
public void B5(final Site site) {
Optional.ofNullable(this.T).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
((x9) obj).j0(site);
}
});
}
public void B6(FragmentActivity fragmentActivity, SafeBundle safeBundle) {
if (this.l0 == null || fragmentActivity == null || safeBundle == null) {
return;
}
String str = this.F;
if (str != null) {
this.G.push(str);
}
ShareLocationCreateOnNaviFragment shareLocationCreateOnNaviFragment = new ShareLocationCreateOnNaviFragment();
this.E = shareLocationCreateOnNaviFragment;
shareLocationCreateOnNaviFragment.setArguments(safeBundle.getBundle());
this.F = ShareLocationCreateOnNaviFragment.class.getSimpleName();
SlidingContainerManager.d().D(fragmentActivity, this.E);
}
public void C0(ScreenDisplayStatus screenDisplayStatus, Activity activity) {
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding == null) {
}
CoordinatorLayout.LayoutParams layoutParams = homeSlideLayoutBinding.scrollPageLayout.getLayoutParams();
switch (i.a[screenDisplayStatus.ordinal()]) {
case 1:
case 2:
ct3.p0(this.r0.scrollPageLayout, ct3.x(activity));
layoutParams.setMarginStart(0);
this.r0.scrollPageLayout.setLayoutParams(layoutParams);
break;
case 3:
case 4:
case 5:
case 6:
ct3.p0(this.r0.scrollPageLayout, ct3.L(ct3.s(), false));
layoutParams.setMarginStart(ct3.s().getMargin());
this.r0.scrollPageLayout.setLayoutParams(layoutParams);
break;
}
}
public boolean C1() {
return this.i;
}
public final void C2() {
Point screenLocation;
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
hm4.p("MapUIController", "toolbarBinding in null");
return;
}
petalMapsToolbarBinding.gnssView.setVisibility(0);
MapHelper.F2().g5();
int P1 = P1();
int u = ct3.u();
int f2 = ct3.c0(this.Z) ? ct3.f() : 0;
Projection d3 = MapHelper.F2().d3();
if (d3 == null || (screenLocation = d3.toScreenLocation(MapHelper.F2().O2())) == null) {
return;
}
int i2 = screenLocation.y;
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) this.o0.gnssView.getLayoutParams();
layoutParams.topMargin = ((u - P1) - f2) - i2;
this.o0.gnssView.setLayoutParams(layoutParams);
}
public void C4() {
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding == null) {
return;
}
setWeatherBadgeMarginBottom(homeSlideLayoutBinding.scrollPageLayout.getExitOffset());
}
public void C5(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.toolbarRootLayout.setVisibility(z ? 0 : 8);
}
}
public void C6() {
PetalMapsOtherViewBinding petalMapsOtherViewBinding = this.m0;
if (petalMapsOtherViewBinding == null || petalMapsOtherViewBinding.getIsShowTeamMapBottom()) {
return;
}
this.m0.setIsShowTeamMapBottom(true);
}
public void D0(final int i2) {
if (i2 == 0 && !ct3.W(o41.c())) {
MapHelper.F2().O7(false);
}
if (this.E == null || i2 != 0) {
com.huawei.maps.app.common.utils.task.a.f(com.huawei.maps.app.common.utils.task.a.a("MapUIController", "adjustView", new Runnable() {
@Override
public final void run() {
a.this.c3(i2);
}
}), 200L);
}
}
public MapDrivingInfo D1() {
NaviViewModel i0;
NavFragment navFragment = this.A;
if (navFragment == null || (i0 = navFragment.i0()) == null) {
return null;
}
return (MapDrivingInfo) i0.p.n1().getValue();
}
public final void D2(Activity activity) {
int F = ct3.F(activity);
if (b55.c().a() != null) {
int height = b55.c().a().petalMaps.getHeight();
this.r0.scrollPageLayout.setScreenHeight(height);
SlidingContainerManager.d().h(height);
}
this.r0.scrollPageLayout.setMinOffset(F + ct3.b(activity, 8.0f));
this.r0.scrollPageLayout.setMaxOffset(ve8.m);
this.r0.scrollPageLayout.setExitOffset(ct3.b(o41.b(), 128.0f));
this.r0.scrollPageLayout.setIsSupportExit(true);
this.r0.scrollPageLayout.getBackground().setAlpha(0);
this.r0.scrollPageLayout.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
a.this.p3(view);
}
});
this.r0.scrollPageLayout.X();
ve8.p().u(this.r0.scrollPageLayout);
C0(ct3.A(activity), activity);
}
public void D4() {
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding == null) {
return;
}
setWeatherDisplayExtraMarginBottom(homeSlideLayoutBinding.scrollPageLayout.getExitOffset());
}
public void D5(final boolean z) {
fk2.f(new Runnable() {
@Override
public final void run() {
a.this.F3(z);
}
});
}
public void D6(FragmentActivity fragmentActivity, Bundle bundle) {
if (this.l0 == null || fragmentActivity == null) {
handleOpacityCoatingViewEnable(false);
return;
}
if (fragmentActivity.getSupportFragmentManager().findFragmentById(R.id.sliding_container) instanceof TeamMapDestinationInfoByMemberFragment) {
hm4.p("MapUIController", "Team Map Destination Info Member fragment already exist.");
return;
}
String str = this.F;
if (str != null) {
this.G.push(str);
}
this.r0.setIsShowScrollPageLayout(false);
SlidingContainerManager.d().B(true);
TeamMapDestinationInfoByMemberFragment teamMapDestinationInfoByMemberFragment = new TeamMapDestinationInfoByMemberFragment();
this.E = teamMapDestinationInfoByMemberFragment;
teamMapDestinationInfoByMemberFragment.setArguments(bundle);
this.F = TeamMapDestinationInfoByMemberFragment.class.getSimpleName();
x1().hideLogo();
SlidingContainerManager.d().t(false);
SlidingContainerManager.d().D(fragmentActivity, this.E);
}
public final void E0(ScreenDisplayStatus screenDisplayStatus, Context context) {
if (this.o0 == null) {
}
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(this.o0.weatherBadgeAndLogo.getLayoutParams());
switch (i.a[screenDisplayStatus.ordinal()]) {
case 1:
case 2:
case 3:
layoutParams.gravity = 8388691;
layoutParams.setMargins(0, 0, 0, 0);
this.o0.weatherBadgeAndLogo.setLayoutParams(layoutParams);
scrollWeatherBadge(ve8.p().m());
MapHelper.F2().O7(false);
break;
case 4:
case 5:
case 6:
int L = ct3.L(ct3.s(), false);
layoutParams.gravity = 8388691;
layoutParams.setMargins(0, 0, 0, ct3.b(context, 12.0f));
layoutParams.setMarginStart(L + ct3.b(context, 36.0f));
this.o0.weatherBadgeAndLogo.setLayoutParams(layoutParams);
showLogo(false);
break;
}
}
public final int E1(int i2) {
if (i2 == 1) {
return R.string.location_info_open_service;
}
if (i2 == 2) {
return R.string.permission_enable_required_title_location;
}
if (i2 != 3) {
return 0;
}
return Build.VERSION.SDK_INT >= 29 ? R.string.map_msg_location_closed_hms_always : R.string.map_nav_msg_location_closed_hms;
}
public void E2() {
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding == null) {
return;
}
P5(homeSlideLayoutBinding.themeView, r1());
}
public final void E3(View view) {
x59.a.d("sp_key_share_loaction_share_with_me_bt");
this.o0.setIsShareWithMeBtnRedVisible(false);
j59.l("5");
k59.e();
w59.a.w(this.Z);
}
public void E4() {
if (TicketErrorInfo.TICKET_ERROR_TYPE_NO_DATA.equals(p19.F().b0()) && c06.c() && p19.F().U()) {
x1().r5(true);
}
}
public void E5(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
petalMapsToolbarBinding.setIsShowLicensePlateRestriction(z);
R6();
if (this.o0.getIsShowLicensePlateRestriction() && fo7.f().l()) {
fo7.f().B(this.o0.licensePlateRestrictionBtn);
}
}
public void E6(FragmentActivity fragmentActivity, Bundle bundle) {
if (this.l0 == null || fragmentActivity == null) {
handleOpacityCoatingViewEnable(false);
return;
}
FragmentManager supportFragmentManager = fragmentActivity.getSupportFragmentManager();
int i2 = R.id.sliding_container;
if (supportFragmentManager.findFragmentById(i2) instanceof TeamMapMemberInfoFragment) {
TeamMapMemberInfoFragment findFragmentById = fragmentActivity.getSupportFragmentManager().findFragmentById(i2);
if (findFragmentById != null) {
findFragmentById.v((TeamMemberSiteInfo) bundle.getParcelable("team_member_to_detail"), true);
}
hm4.p("MapUIController", "Team Map Member Info fragment already exist.");
return;
}
String str = this.F;
if (str != null) {
this.G.push(str);
}
this.r0.setIsShowScrollPageLayout(false);
SlidingContainerManager.d().B(true);
TeamMapMemberInfoFragment teamMapMemberInfoFragment = new TeamMapMemberInfoFragment();
this.E = teamMapMemberInfoFragment;
teamMapMemberInfoFragment.setArguments(bundle);
this.F = TeamMapMemberInfoFragment.class.getSimpleName();
x1().hideLogo();
SlidingContainerManager.d().t(true);
SlidingContainerManager.d().D(fragmentActivity, this.E);
}
public void F0() {
if (this.r0 == null) {
return;
}
ScreenDisplayStatus A = ct3.A(o41.c());
if (A == ScreenDisplayStatus.MATAX_AND_TAHITI_AND_LANDSCAPE || A == ScreenDisplayStatus.MATAX_AND_TAHITI_AND_PORTRAIT || A == ScreenDisplayStatus.PAD_AND_LANDSCAPE) {
x0();
return;
}
if (SlidingContainerManager.d().i()) {
return;
}
if (SlidingContainerManager.d().k()) {
SlidingContainerManager.d().r();
return;
}
if (vz8.B().K()) {
x1().setWeatherBadgeMarginBottom(vz8.B);
return;
}
if (s68.a().d() || this.L != 0) {
int openMarginBottom = this.r0.scrollPageLayout.getOpenMarginBottom();
float m = ve8.p().m();
if (m == 1.0f) {
m = 0.0f;
}
setWeatherBadgeMarginBottom((int) (openMarginBottom + ((this.r0.scrollPageLayout.getOpenMarginBottom() - this.r0.scrollPageLayout.getExitMarginBottom()) * m)));
}
}
public BadgeDrawable F1() {
return this.i0;
}
public final boolean F2(ScreenDisplayStatus screenDisplayStatus, HwColumnSystem hwColumnSystem) {
ScreenDisplayStatus screenDisplayStatus2;
HwColumnSystem hwColumnSystem2 = this.v;
if (hwColumnSystem2 == null || (screenDisplayStatus2 = this.u) == null) {
hm4.f("MapUIController", "[isDeviceLayoutChange] first init");
return true;
}
if (screenDisplayStatus2 == screenDisplayStatus && hwColumnSystem2.getTotalColumnCount() == hwColumnSystem.getTotalColumnCount()) {
hm4.f("MapUIController", "[isDeviceLayoutChange] false");
return false;
}
hm4.f("MapUIController", "[isDeviceLayoutChange] true");
return true;
}
public final void F3(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
if (z) {
petalMapsToolbarBinding.setIsShareWithMeBtnRedVisible(!x59.a.b("sp_key_share_loaction_share_with_me_bt"));
} else {
petalMapsToolbarBinding.setIsShareWithMeBtnRedVisible(false);
}
this.o0.setIsShareWithMeBtnVisible(z);
this.o0.petalMapsShareWithMeBtn.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
a.this.E3(view);
}
});
}
}
public void F4(float f2, boolean z) {
ScreenDisplayStatus A;
if (this.r0 == null) {
return;
}
if (c06.g()) {
hm4.f("MapUIController", "complete sheet is showing....");
return;
}
if (qc6.c(this.X)) {
hm4.p("MapUIController", "offline viewMap success.");
MapHelper.F2().U0(this.X, new c());
return;
}
if (qc6.c(e2a.e().f()) || (A = ct3.A(o41.b())) == ScreenDisplayStatus.PAD_AND_LANDSCAPE || A == ScreenDisplayStatus.MATAX_AND_TAHITI_AND_LANDSCAPE || A == ScreenDisplayStatus.MATAX_AND_TAHITI_AND_PORTRAIT) {
return;
}
if (this.W == null) {
this.W = MapHelper.F2().n2();
}
if (f2 > 0.0f) {
f2 = 0.0f;
}
MapHelper.F2().F7(0, 0, 0, (int) (this.r0.scrollPageLayout.getOpenMarginBottom() + ((this.r0.scrollPageLayout.getOpenMarginBottom() - this.r0.scrollPageLayout.getExitMarginBottom()) * f2)));
if (!this.Y) {
this.W = MapHelper.F2().n2();
}
if (z && !com.huawei.maps.businessbase.manager.location.a.D()) {
hm4.h("MapUIController", "scrollPadding failed ,needLocationUpdateSuccess but isLocationUpdateSuccess is failed.");
} else {
hm4.f("MapUIController", "animateCamera success.");
MapHelper.F2().R0(CameraUpdateFactory.newLatLng(this.W.target), 0L, (HWMap.CancelableCallback) null);
}
}
public void F5(boolean z) {
this.e = z;
}
public void F6() {
TeamMemberListLayoutBinding teamMemberListLayoutBinding = this.q0;
if (teamMemberListLayoutBinding != null) {
if (!teamMemberListLayoutBinding.getIsShowTeamMapMember()) {
this.q0.setIsShowTeamMapMember(true);
}
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null || !petalMapsToolbarBinding.getIsLayerBtnVisible()) {
return;
}
this.o0.setIsLayerBtnVisible(false);
}
}
public final void G0(ScreenDisplayStatus screenDisplayStatus, Context context) {
if (this.o0 == null) {
return;
}
int i2 = i.a[screenDisplayStatus.ordinal()];
if (i2 == 1 || i2 == 2 || i2 == 3) {
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(this.o0.weatherDisplayExtra.getLayoutParams());
layoutParams.gravity = 8388691;
layoutParams.setMargins(0, 0, 0, ct3.b(context, 120.0f));
this.o0.weatherDisplayExtra.setLayoutParams(layoutParams);
}
}
public NavController G1(FragmentActivity fragmentActivity) {
NavHostFragment findFragmentById = fragmentActivity.getSupportFragmentManager().findFragmentById(R.id.fragment_container_view);
if (findFragmentById instanceof NavHostFragment) {
return findFragmentById.getNavController();
}
return null;
}
public boolean G2() {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
return petalMapsToolbarBinding != null && petalMapsToolbarBinding.petalMapsDirectionBtn.getVisibility() == 0;
}
public void G4(boolean z) {
ActivityPetalMapsBinding activityPetalMapsBinding = this.l0;
if (activityPetalMapsBinding == null) {
return;
}
activityPetalMapsBinding.setIsDark(z);
if (c06.b()) {
return;
}
S6(this.j);
}
public void G5(boolean z) {
this.U = z;
}
public void G6(Activity activity, String str) {
com.huawei.maps.app.setting.ui.fragment.team.a aVar = this.m;
if (aVar != null && aVar.isShowing()) {
hm4.p("MapUIController", "TeamTypeDialog is showing");
this.m.B(str);
return;
}
View inflate = LayoutInflater.from(o41.c()).inflate(R.layout.team_setting_type_dialog_layout, (ViewGroup) null);
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(-1, -1);
TeamSettingTypeDialogLayoutBinding teamSettingTypeDialogLayoutBinding = (TeamSettingTypeDialogLayoutBinding) DataBindingUtil.bind(inflate);
this.o = teamSettingTypeDialogLayoutBinding;
if (teamSettingTypeDialogLayoutBinding == null) {
return;
}
teamSettingTypeDialogLayoutBinding.teamPrecise.e();
this.o.teamBlurred.e();
inflate.setLayoutParams(layoutParams);
this.o.setVariable(t40.D2, Boolean.valueOf(o9a.d()));
this.m = new com.huawei.maps.app.setting.ui.fragment.team.a(activity);
this.m.C(fn9.b().f());
this.m.B(str);
this.m.show();
}
public void H0(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
if (z) {
MapImageButton mapImageButton = petalMapsToolbarBinding.petalMapsAlongSearchImg;
Context c2 = o41.c();
int i2 = R.drawable.hw_maps_along_search;
int i3 = com.huawei.maps.poi.R.color.hos_icon_color_primary_dark;
mapImageButton.setImageDrawable(o41.i(c2, i2, i3));
this.o0.petalMapsAlongStopBackBtn.setImageDrawable(o41.i(o41.c(), R.drawable.map_along_ic_back, i3));
this.o0.petalMapsShareWithMeBtn.setImageDrawable(o41.i(o41.c(), R.drawable.ic_public_contacts_group, i3));
this.o0.selectPoiSearchButton.setImageDrawable(o41.i(o41.c(), i2, i3));
return;
}
MapImageButton mapImageButton2 = petalMapsToolbarBinding.petalMapsAlongSearchImg;
Context c3 = o41.c();
int i4 = R.drawable.hw_maps_along_search;
int i5 = com.huawei.maps.poi.R.color.hos_icon_color_primary;
mapImageButton2.setImageDrawable(o41.i(c3, i4, i5));
this.o0.petalMapsAlongStopBackBtn.setImageDrawable(o41.i(o41.c(), R.drawable.map_along_ic_back, i5));
this.o0.petalMapsShareWithMeBtn.setImageDrawable(o41.i(o41.c(), R.drawable.ic_public_contacts_group, i5));
this.o0.selectPoiSearchButton.setImageDrawable(o41.i(o41.c(), i4, i5));
}
public NavFragment H1() {
return this.A;
}
public boolean H2() {
return this.w0;
}
public final void H3(PetalMapsToolbarBinding petalMapsToolbarBinding) {
petalMapsToolbarBinding.petalMapsDescBtn.setVisibility(8);
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding != null) {
petalMapsChildViewBinding.bottomLayout.setVisibility(8);
}
}
public boolean H4(int i2) {
boolean z;
hm4.f("MapUIController", "setNaviHeight");
if (this.r0 == null) {
return false;
}
if (ve8.p().F(i2)) {
ve8.p().h0(i2);
ve8.p().O(BaseHistoryFragment.MAX_SUG_LENGTH);
z = true;
} else {
ve8.p().h0(i2);
ve8.p().M(BaseHistoryFragment.MAX_SUG_LENGTH);
z = false;
}
ve8.p().W(false);
return z;
}
public void H5(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.setIsShowTeamFullViewButton(z);
}
}
public void H6(FragmentActivity fragmentActivity, TrafficEventInfo trafficEventInfo) {
if (this.l0 == null || fragmentActivity == null || fragmentActivity.isFinishing() || this.r0 == null) {
handleOpacityCoatingViewEnable(false);
return;
}
try {
FragmentManager supportFragmentManager = fragmentActivity.getSupportFragmentManager();
int i2 = R.id.sliding_container;
if (supportFragmentManager.findFragmentById(i2) instanceof TrafficEventDetailMainFragment) {
hm4.p("MapUIController", "traffic detail fragment already exist.");
TrafficEventDetailMainFragment findFragmentById = fragmentActivity.getSupportFragmentManager().findFragmentById(i2);
if (findFragmentById == null || c06.b()) {
return;
}
findFragmentById.K(trafficEventInfo);
findFragmentById.y(trafficEventInfo);
return;
}
} catch (IllegalArgumentException unused) {
hm4.h("MapUIController", "IllegalArgumentException view not find");
} catch (Exception unused2) {
hm4.h("MapUIController", "Exception view not find");
}
if (fragmentActivity instanceof PetalMapsActivity) {
br8.s((PetalMapsActivity) fragmentActivity);
}
String str = this.F;
if (str != null) {
this.G.push(str);
}
a1();
this.r0.setIsShowScrollPageLayout(false);
SlidingContainerManager.d().B(true);
this.E = new TrafficEventDetailMainFragment(trafficEventInfo);
this.F = TrafficEventDetailMainFragment.class.getSimpleName();
x1().hideLogo();
SlidingContainerManager.d().t(true);
SlidingContainerManager.d().D(fragmentActivity, this.E);
}
public void I0(Activity activity) {
if (this.l0 == null) {
return;
}
ct3.g0(activity);
}
public int I1() {
PetalMapsNavLayoutBinding petalMapsNavLayoutBinding = this.p0;
if (petalMapsNavLayoutBinding == null || petalMapsNavLayoutBinding.bottomNav.getVisibility() != 0) {
return 0;
}
return this.p0.bottomNav.getHeight();
}
public boolean I2() {
return this.j0;
}
public void I4(boolean z) {
N4(z);
}
public void I5(boolean z) {
if (this.o0 != null) {
boolean z2 = (!z || L2() || this.Q) ? false : true;
if (this.o0.getIsShowTeamMap() == z2) {
return;
}
this.o0.setIsShowTeamMap(z2);
}
}
public void I6(final FragmentActivity fragmentActivity, String str) {
if (this.l0 == null || fragmentActivity == null) {
handleOpacityCoatingViewEnable(false);
return;
}
if (fragmentActivity instanceof PetalMapsActivity) {
br8.s((PetalMapsActivity) fragmentActivity);
}
String str2 = this.F;
if (str2 != null) {
this.G.push(str2);
}
this.r0.setIsShowScrollPageLayout(false);
SlidingContainerManager.d().B(true);
this.E = new TrafficEventPushFragment(str);
this.F = TrafficEventPushFragment.class.getSimpleName();
x1().hideLogo();
ml4.h((PetalMapsActivity) fragmentActivity, new SimpleListener() {
public final void then() {
a.this.b4(fragmentActivity);
}
});
}
public void J0(FragmentActivity fragmentActivity) {
if (this.G.isEmpty() || !TrafficEventDetailMainFragment.class.getSimpleName().equals(this.G.pop())) {
hideSlidingContainer();
} else {
H6(fragmentActivity, com.huawei.maps.app.petalmaps.trafficevent.a.v());
}
}
public PetalMapsNavLayoutBinding J1() {
return this.p0;
}
public boolean J2() {
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
return petalMapsChildViewBinding != null && petalMapsChildViewBinding.getInCruiseNav();
}
public final void J3(String str, PetalMapsToolbarBinding petalMapsToolbarBinding) {
this.h0 = MapTipsShowHelperV2.INSTANCE.getInstance().showCommonTips(petalMapsToolbarBinding.petalMapsBadResultBtn, str);
}
public void J4(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.setIfCompassBtnVisibility(z);
}
}
public void J5(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.setIsShowTeamMapTips(z);
}
}
public void J6() {
hm4.p("MapUIController", " otherViewBinding showTransFloatView ");
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding != null) {
CoordinatorLayout.LayoutParams layoutParams = petalMapsChildViewBinding.transBottomView.transFloatLayout.getLayoutParams();
if (ct3.W(o41.c())) {
((ViewGroup.MarginLayoutParams) layoutParams).width = ct3.L(ct3.s(), false);
layoutParams.setMarginStart(ct3.b(o41.c(), 24.0f));
} else {
((ViewGroup.MarginLayoutParams) layoutParams).width = -1;
layoutParams.setMarginStart(0);
}
this.n0.transBottomView.transFloatLayout.setLayoutParams(layoutParams);
this.n0.transBottomView.transStartNaviBtn.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
a.this.c4(view);
}
});
this.n0.transBottomView.transRouteSettingIcon.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
a.this.d4(view);
}
});
this.n0.setIsShowTransFloatView(true);
}
}
public void K0() {
if (this.l0 == null) {
return;
}
a5(true);
b5(false);
handleOpacityCoatingViewEnable(false);
SlidingContainerManager.d().f(this.E);
this.E = null;
if (s68.a().d()) {
x5();
resetLocationBtn();
}
Object obj = this.Z;
if (obj != null && (obj instanceof PetalMapsActivity)) {
PetalMapsActivity petalMapsActivity = (PetalMapsActivity) obj;
if (!c06.b() && (nx6.a.g(petalMapsActivity) instanceof ExploreHomeFragment)) {
x1().showWeatherBadge();
}
}
if (this.l0.getRoot().getContext() instanceof PetalMapsActivity) {
br8.K((PetalMapsActivity) this.l0.getRoot().getContext());
}
if ((TextUtils.equals(this.F, LayerSettingFragment.class.getSimpleName()) || TextUtils.equals(this.F, AlongSearchInfoFragment.class.getSimpleName())) && x1().W2()) {
x1().e6(x1().O1());
}
this.F = null;
this.G.clear();
}
public View K1() {
return this.o0.petalMapsDirectionBtn;
}
public boolean K2() {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
return petalMapsToolbarBinding.getIsLayerBtnVisible();
}
return false;
}
public final void K3() {
fk2.d(this.f0);
}
public void K4(float f2) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.petalMapsCompassBtn.setRotation(f2);
}
}
public void K5(HomeSlideLayoutBinding homeSlideLayoutBinding) {
this.r0 = homeSlideLayoutBinding;
}
public void K6() {
hm4.p("MapUIController", " otherViewBinding showTransNaviSettingView ");
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding != null) {
CoordinatorLayout.LayoutParams layoutParams = petalMapsChildViewBinding.transBottomNaviView.transFloatLayout.getLayoutParams();
if (ct3.W(o41.c())) {
((ViewGroup.MarginLayoutParams) layoutParams).width = ct3.L(ct3.s(), false);
layoutParams.setMarginStart(ct3.b(o41.c(), 24.0f));
} else {
((ViewGroup.MarginLayoutParams) layoutParams).width = -1;
layoutParams.setMarginStart(0);
}
this.n0.transBottomNaviView.transFloatLayout.setLayoutParams(layoutParams);
this.n0.transBottomNaviView.transExitLayout.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
a.this.e4(view);
}
});
this.n0.transBottomNaviView.transStartNaviBtn.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
a.this.f4(view);
}
});
this.n0.transBottomNaviView.transNaviSettingIcon.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
a.this.g4(view);
}
});
this.n0.setIsShowTransNaviView(true);
}
}
public boolean L0() {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
return petalMapsToolbarBinding != null && petalMapsToolbarBinding.badResultBubbleLayout.getVisibility() == 0;
}
public View L1() {
ViewStubProxy viewStubProxy;
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null && (viewStubProxy = petalMapsToolbarBinding.vsPrivacyButtonLayout) != null && this.t == null && viewStubProxy.getViewStub() != null) {
this.t = this.o0.vsPrivacyButtonLayout.getViewStub().inflate();
}
return this.t;
}
public boolean L2() {
return this.P;
}
public final void L3(int i2) {
if (!P2(i2)) {
hm4.p("MapUIController", "isShowConditionQuantityTips false");
return;
}
Object obj = this.Z;
if (obj == null || !(obj instanceof PetalMapsActivity) || this.o0 == null) {
return;
}
if (nx6.a.g((PetalMapsActivity) obj) instanceof ExploreHomeFragment) {
hm4.p("MapUIController", "showConditionQuantityTips");
MapTipsShowHelperV2.INSTANCE.getInstance().showConditionQuantityTips(this.o0.gnssViewPad, o41.c().getResources().getQuantityString(R.plurals.map_msg_road_condition_quantity, i2, Integer.valueOf(i2)), (ct3.u() - ct3.f()) / 2).setOnDismissListener(new PopupWindow.OnDismissListener() {
@Override
public final void onDismiss() {
a.this.K3();
}
});
this.o0.gnssViewPad.setVisibility(8);
}
}
public void L4(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
petalMapsToolbarBinding.setCruiseLaneOverSize(z);
}
public final void L5(Drawable drawable, int i2) {
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding == null) {
return;
}
SlideView findViewById = homeSlideLayoutBinding.scrollPageLayout.findViewById(R.id.slide_onsearch);
if (findViewById instanceof SlideView) {
findViewById.setBackground(drawable);
findViewById.setBackgroundColorRes(i2);
}
}
public void L6(FragmentActivity fragmentActivity) {
if (this.l0 == null || fragmentActivity == null || this.n0 == null) {
return;
}
Optional.ofNullable(this.x).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
a.h4((ActivityViewModel) obj);
}
});
gn4.i().k();
this.B = new CruiseNavFragment();
this.n0.setInNav(true);
this.m0.setInCruiseNav(true);
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding != null) {
homeSlideLayoutBinding.setInNav(true);
}
T0();
hideWeatherBadge();
y2(false);
setFromLayer(Boolean.FALSE);
if (fragmentActivity.isDestroyed() || fragmentActivity.isFinishing()) {
hm4.p("MapUIController", "startCruiseNav activity isDestroyed or isFinishing");
return;
}
FragmentManager supportFragmentManager = fragmentActivity.getSupportFragmentManager();
if (supportFragmentManager.isDestroyed()) {
hm4.h("MapUIController", "startCruiseNav fragmentManager has been destroyed.");
return;
}
if (c06.b()) {
MapDevOpsReport.b("map_navi_and_cruise_error_event").l0("startCruiseNav fail, current state is navi").m1().e();
hm4.h("MapUIController", "startCruiseNav fail, current state is navi");
return;
}
try {
FragmentTransaction beginTransaction = supportFragmentManager.beginTransaction();
beginTransaction.replace(R.id.cruise_nav_fragment_container, this.B);
beginTransaction.commitAllowingStateLoss();
} catch (IllegalArgumentException unused) {
hm4.h("MapUIController", "startCruiseNav commitAllowingStateLoss IllegalArgumentException");
}
}
public void M0(MapRecyclerView mapRecyclerView, NestedScrollView nestedScrollView) {
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding != null) {
homeSlideLayoutBinding.scrollPageLayout.W(mapRecyclerView, nestedScrollView);
}
}
public final int M1(int i2) {
return ct3.b(o41.c(), i2);
}
public boolean M2() {
PetalMapsToolbarBinding petalMapsToolbarBinding;
return (this.n0 == null || (petalMapsToolbarBinding = this.o0) == null || petalMapsToolbarBinding.logoDrawingNo.getVisibility() != 0) ? false : true;
}
public final void M3() {
fk2.d(this.f0);
}
public void M4(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.setIsDirectionBtnVisible(z && petalMapsToolbarBinding.getIsLocationBtnVisible() && V2());
}
}
public final void M5(int i2) {
this.x0 = i2;
}
public void M6(FragmentActivity fragmentActivity) {
if (this.l0 == null || fragmentActivity == null || this.n0 == null) {
return;
}
if (com.huawei.maps.businessbase.manager.location.a.z()) {
MapDevOpsReport.b("map_navi_and_cruise_error_event").l0("startNav fail, current state is cruise").m1().e();
hm4.h("MapUIController", "startNav fail, current state is cruise");
j1(fragmentActivity);
}
gn4.i().k();
MapHelper.F2().S7(false);
this.A = new NavFragment();
this.n0.setInNav(true);
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding != null) {
homeSlideLayoutBinding.setInNav(true);
}
it3.x().b0(a06.l());
String fromCityCode = NaviCurRecord.getInstance().getFromCityCode();
String endCityCode = NaviCurRecord.getInstance().getEndCityCode();
hp5.D().setHideRedTraffic(false);
it3.x().j0(k.l4("Traffic_light_reading_city_trust_list", fromCityCode, endCityCode));
x1().W0(fragmentActivity);
setFromLayer(Boolean.FALSE);
if (fragmentActivity.isDestroyed() || fragmentActivity.isFinishing()) {
hm4.h("MapUIController", "startNav activity isDestroyed or isFinishing");
return;
}
FragmentManager supportFragmentManager = fragmentActivity.getSupportFragmentManager();
if (supportFragmentManager.isDestroyed()) {
hm4.h("MapUIController", "startNav fragmentManager has been destroyed.");
return;
}
try {
FragmentTransaction beginTransaction = supportFragmentManager.beginTransaction();
beginTransaction.replace(R.id.nav_fragment_container, this.A);
beginTransaction.commitAllowingStateLoss();
} catch (IllegalArgumentException unused) {
hm4.h("MapUIController", "startNav commitAllowingStateLoss IllegalArgumentException");
}
setIsNavinfoLogoVisible();
}
public void N0() {
Optional.ofNullable(this.T).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
((x9) obj).x();
}
});
}
public View N1() {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
return petalMapsToolbarBinding.petalMapsBadResultBtn;
}
return null;
}
public boolean N2() {
NavCommuteFragment navCommuteFragment = this.O;
return navCommuteFragment != null && navCommuteFragment.isVisible();
}
public final void N3(int i2) {
if (!P2(i2)) {
hm4.p("MapUIController", "isShowConditionQuantityTips false");
return;
}
Object obj = this.Z;
if (obj == null || !(obj instanceof PetalMapsActivity) || this.o0 == null) {
return;
}
if (nx6.a.g((PetalMapsActivity) obj) instanceof ExploreHomeFragment) {
hm4.p("MapUIController", "showConditionQuantityTips");
MapTipsShowHelperV2.INSTANCE.getInstance().showConditionQuantityTips(this.o0.gnssView, o41.c().getResources().getQuantityString(R.plurals.map_msg_road_condition_quantity, i2, Integer.valueOf(i2)), ((FrameLayout.LayoutParams) this.o0.gnssView.getLayoutParams()).topMargin).setOnDismissListener(new PopupWindow.OnDismissListener() {
@Override
public final void onDismiss() {
a.this.M3();
}
});
this.o0.gnssView.setVisibility(8);
}
}
public void N4(boolean z) {
if (this.o0 == null) {
return;
}
if (!k.H1() || AlongSearchHelper.c()) {
this.o0.setIsDisplayAlongSearch(false);
} else if (p19.F().U()) {
this.o0.setIsDisplayAlongSearch(false);
} else {
this.o0.setIsDisplayAlongSearch(z);
}
}
public void N5(boolean z) {
this.d0 = z;
}
public void N6() {
Optional.ofNullable(this.T).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
((x9) obj).n0();
}
});
}
public void O0(boolean z) {
PetalMapsNavLayoutBinding petalMapsNavLayoutBinding = this.p0;
if (petalMapsNavLayoutBinding == null) {
return;
}
petalMapsNavLayoutBinding.bottomNav.F(z);
}
public List<Site> O1() {
x9 x9Var = this.T;
return x9Var == null ? new ArrayList() : x9Var.A();
}
public boolean O2() {
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
return homeSlideLayoutBinding != null && homeSlideLayoutBinding.scrollPageLayout.getCurrentStatus() == MapScrollLayout.Status.EXPANDED;
}
public final void O3(DialogInterface dialogInterface, int i2) {
n3();
}
public void O4(final FragmentDriveNavBinding fragmentDriveNavBinding) {
x2();
Optional.ofNullable(this.T).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
((x9) obj).g0(FragmentDriveNavBinding.this);
}
});
}
public void O5(int i2) {
this.h = i2;
}
public void P0(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.petalMapsFeedbackBtn.q(z);
}
}
public int P1() {
return this.x0;
}
public boolean P2(int i2) {
if (i2 > 0) {
return true;
}
hm4.p("MapUIController", "totalEventCount less than or equal to zero");
return false;
}
public void P4(boolean z, boolean z2) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.setIsFullViewRoute(z2);
this.o0.setIsShowFullViewButton(z);
}
}
public final void P5(FrameLayout frameLayout, CustomHwBottomNavigationView customHwBottomNavigationView) {
if (customHwBottomNavigationView == null || frameLayout == null) {
return;
}
if (customHwBottomNavigationView.v()) {
Q5(frameLayout, -A0);
} else {
Q5(frameLayout, 0);
}
}
public void Q0(boolean z) {
ActivityPetalMapsBinding activityPetalMapsBinding = this.l0;
if (activityPetalMapsBinding != null && this.o0 != null) {
activityPetalMapsBinding.setIsDark(z);
this.o0.setIsDark(z);
this.o0.petalMapsFeedbackBtn.q(z);
R6();
}
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding != null) {
homeSlideLayoutBinding.setIsDark(z);
}
BottomViewModel bottomViewModel = this.w;
if (bottomViewModel != null) {
bottomViewModel.c.setValue(Boolean.valueOf(z));
}
TeamMapBottomViewModel teamMapBottomViewModel = this.q;
if (teamMapBottomViewModel != null) {
teamMapBottomViewModel.a.setValue(Boolean.valueOf(z));
}
S6(this.j);
NaviCompletedBottomSheetFragment naviCompletedBottomSheetFragment = this.M;
if (naviCompletedBottomSheetFragment != null) {
naviCompletedBottomSheetFragment.initDarkMode(z);
n5(true);
}
NaviCompletedNonDriveFragment naviCompletedNonDriveFragment = this.N;
if (naviCompletedNonDriveFragment != null) {
naviCompletedNonDriveFragment.initDarkMode(z);
n5(true);
}
LayoutAddReminderBinding layoutAddReminderBinding = this.u0;
if (layoutAddReminderBinding != null) {
layoutAddReminderBinding.setIsDark(z);
}
DialogRewardBinding dialogRewardBinding = this.J;
if (dialogRewardBinding != null) {
dialogRewardBinding.setIsDark(z);
}
x9 x9Var = this.T;
if (x9Var != null) {
x9Var.I();
}
H0(z);
MapHelper.F2().I6(z);
}
public View Q1() {
ViewStubProxy viewStubProxy;
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null && (viewStubProxy = petalMapsToolbarBinding.vsTeamFullViewLayout) != null && this.s == null) {
this.s = viewStubProxy.getViewStub().inflate();
}
return this.s;
}
public boolean Q2() {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return false;
}
return petalMapsToolbarBinding.getIsRoutePreferenceVisible();
}
public final void Q3(FragmentActivity fragmentActivity) {
SlidingContainerManager.d().D(fragmentActivity, this.E);
if (ct3.A(o41.c()) == ScreenDisplayStatus.NORMAL_AND_PORTRAIT || ct3.A(o41.c()) == ScreenDisplayStatus.PAD_AND_PORTRAIT) {
MapHelper.F2().O7(false);
}
}
public void Q4(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
if ((petalMapsToolbarBinding.futrueEtaLl.getTag() instanceof Boolean) && ((Boolean) this.o0.futrueEtaLl.getTag()).booleanValue()) {
return;
}
this.o0.setShowFutrueEta(z);
if (z) {
ScreenDisplayStatus A = ct3.A(o41.b());
boolean z2 = A == ScreenDisplayStatus.PAD_AND_LANDSCAPE || A == ScreenDisplayStatus.MATAX_AND_TAHITI_AND_LANDSCAPE;
boolean z3 = A == ScreenDisplayStatus.MATAX_AND_TAHITI_AND_PORTRAIT;
if (z2 || z3 || A == ScreenDisplayStatus.NORMAL_AND_LANDSCAPE) {
if (this.o0.futrueEtaLl.getLayoutParams() != null) {
this.o0.futrueEtaLl.getLayoutParams().width = ct3.L(ct3.s(), false);
}
} else if (this.o0.futrueEtaLl.getLayoutParams() != null) {
this.o0.futrueEtaLl.getLayoutParams().width = -1;
}
this.o0.futrueEtaLl.requestLayout();
this.o0.futrueEtaClose.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
a.this.z3(view);
}
});
}
}
}
public final void Q5(FrameLayout frameLayout, int i2) {
if (frameLayout == null) {
return;
}
ViewGroup.LayoutParams layoutParams = frameLayout.getLayoutParams();
if (layoutParams instanceof FrameLayout.LayoutParams) {
((FrameLayout.LayoutParams) layoutParams).setMargins(0, i2, 0, 0);
}
}
public final void Q6() {
StringBuilder sb = new StringBuilder();
sb.append(" stopTransNavi mActivity ");
sb.append(this.Z == null);
hm4.f("MapUIController", sb.toString());
Activity activity = this.Z;
if (activity != null) {
j2a.a.r(activity);
dx7.K("1");
}
}
public void R0(float f2) {
PetalMapsOtherViewBinding petalMapsOtherViewBinding = this.m0;
if (petalMapsOtherViewBinding != null) {
petalMapsOtherViewBinding.setOpacityCoatingAlpha(f2);
}
}
public ViewDataBinding R1() {
PetalMapsOtherViewBinding petalMapsOtherViewBinding = this.m0;
if (petalMapsOtherViewBinding == null) {
return null;
}
return petalMapsOtherViewBinding.teamMapBottomView;
}
public boolean R2() {
PetalMapsActivity petalMapsActivity;
Object obj = this.Z;
if (!(obj instanceof PetalMapsActivity) || (petalMapsActivity = (PetalMapsActivity) obj) == null) {
return false;
}
return nx6.a.g(petalMapsActivity) instanceof ServiceAreaInfoFragment;
}
public void R4(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.futrueEtaLl.setTag(Boolean.valueOf(z));
}
}
public void R5() {
ve8.p().O(BaseHistoryFragment.MAX_SUG_LENGTH);
ve8.p().W(false);
showBottomNav();
}
public void R6() {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null || !petalMapsToolbarBinding.getIsShowLicensePlateRestriction()) {
return;
}
boolean isDark = this.o0.getIsDark();
int i2 = isDark ? R.color.hos_text_color_primary_dark : R.color.hos_text_color_primary;
boolean g2 = vo7.b().g();
boolean h2 = vo7.b().h();
int i3 = R.drawable.ic_license_plate;
if (g2 && h2) {
i2 = isDark ? R.color.navi_voice_select_dark : R.color.navi_voice_select;
}
if (g2 && !h2) {
i3 = R.drawable.ic_license_plate_on;
}
this.o0.pmtMvgvLicencePlate.setImageDrawable(o41.i(o41.c(), i3, i2));
this.o0.pmtMtvLicencePlate.setTextColor(o41.d(i2));
}
public void S0(boolean z) {
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding == null) {
return;
}
homeSlideLayoutBinding.setIsDark(z);
}
public ViewDataBinding S1() {
TeamMemberListLayoutBinding teamMemberListLayoutBinding = this.q0;
if (teamMemberListLayoutBinding == null) {
return null;
}
return teamMemberListLayoutBinding;
}
public boolean S2() {
return TextUtils.equals(ShareLocationCreateOnNaviFragment.class.getSimpleName(), this.F);
}
public final void S3(int i2, Context context, int i3, View view) {
SafeIntent safeIntent = new SafeIntent(new Intent());
if (i2 == 0) {
safeIntent.setAction("android.settings.LOCATION_SOURCE_SETTINGS");
} else {
safeIntent.setAction("android.settings.APPLICATION_DETAILS_SETTINGS");
safeIntent.setData(Uri.fromParts("package", context.getPackageName(), null));
}
IntentUtils.safeStartActivityForResultStatic((Activity) context, safeIntent, i3);
dismissPermissionDialog();
}
public void S4(boolean z) {
this.Q = z;
}
public void S5() {
ve8.p().p0(false);
hideBottomNav();
}
public final void S6(MapLocationStatus mapLocationStatus) {
if (this.l0 == null || this.o0 == null || this.m0 == null) {
return;
}
boolean z = false;
boolean z2 = !c06.b() && this.i;
boolean z3 = (L2() || this.Q) ? false : true;
boolean z4 = (zb3.a.x() || fo7.f().n()) ? false : true;
boolean inCruiseNav = this.m0.getInCruiseNav();
if (z2 && z3 && z4 && !inCruiseNav) {
z = true;
}
this.i = z;
this.o0.setIsLocationBtnVisible(z);
if (!com.huawei.maps.businessbase.manager.location.a.D() && mapLocationStatus != MapLocationStatus.ERROR) {
h5(R.drawable.map_location_move);
i5(12);
return;
}
int i2 = i.b[mapLocationStatus.ordinal()];
if (i2 == 1 || i2 == 2) {
this.o0.petalMapsLocationBtn.setImageResource(o9a.d() ? R.drawable.map_location_compass_button_dark : R.drawable.map_location_compass_button);
i5(5);
return;
}
if (i2 == 3) {
h5(R.drawable.map_location_move);
i5(12);
} else if (i2 == 4) {
h5(R.drawable.ic_tips_two);
i5(12);
} else {
if (i2 != 5) {
return;
}
this.o0.petalMapsLocationBtn.setImageResource(o9a.d() ? R.drawable.map_location_default_button_dark : R.drawable.map_location_default_button);
i5(5);
}
}
public void T0() {
if (this.n0 == null || this.o0 == null || this.p0 == null) {
return;
}
LocationHelper.v().changeLocationDefault();
hideSlidingContainer();
q2();
r5(false);
this.p0.setShowBottomNav(false);
hm4.p("MapUIController", "changeToCruiseNavigationPage is isLocationBtnVisible: " + this.i);
this.o0.setIsLocationBtnVisible(false);
this.o0.setIsLayerBtnVisible(false);
this.o0.setIfCompassBtnVisibility(false);
x1().setIsPetalLogoVisible(false);
LocationHelper.v().setLocationMarkerVisibility(false);
RouteDataManager.b().O(false);
hideLogo();
this.n0.bottomLayout.setViewName(-1);
}
public View T1() {
ViewStubProxy viewStubProxy;
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null && (viewStubProxy = petalMapsToolbarBinding.vsTeamTipsLayout) != null && this.r == null) {
this.r = viewStubProxy.getViewStub().inflate();
}
return this.r;
}
public boolean T2() {
return TextUtils.equals(this.F, TrafficEventDetailMainFragment.class.getSimpleName());
}
public final void T3(View view) {
dismissPermissionDialog();
}
public final void T4(LayoutIndoorSwitchViewBinding layoutIndoorSwitchViewBinding) {
if (layoutIndoorSwitchViewBinding != null) {
u04.a.I(layoutIndoorSwitchViewBinding.indoorView);
}
}
public void T5(final boolean z) {
Optional.ofNullable(this.T).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
((x9) obj).k0(z);
}
});
}
public final void U0(int i2) {
int y;
int y2;
int u;
int F = ct3.F(o41.c()) + M1(120);
int M1 = M1(0);
if (ct3.A(o41.c()) == ScreenDisplayStatus.PAD_AND_LANDSCAPE || ct3.R()) {
if (com.huawei.maps.businessbase.utils.a.z()) {
y2 = M1;
y = (int) (ct3.y(o41.c()) * 0.1d);
} else {
y = (int) (ct3.y(o41.c()) * 0.5d);
y2 = (int) (ct3.y(o41.c()) * 0.1d);
}
u = (int) (ct3.u() * 0.5d);
} else {
y = (int) (ct3.y(o41.c()) * 0.2d);
y2 = (int) (ct3.y(o41.c()) * 0.2d);
u = (int) (ct3.u() * 0.65d);
}
hm4.f("MapUIController", " padding in dp: left: " + t1(y) + " top: " + t1(F) + " right: " + t1(y2) + " botton: " + t1(u));
MapHelper.F2().k1(y, F, y2, u);
}
public View U1(boolean z) {
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding == null) {
return null;
}
return z ? petalMapsChildViewBinding.transBottomNaviView.transNaviSettingIcon : petalMapsChildViewBinding.transBottomView.transRouteSettingIcon;
}
public boolean U2() {
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
return petalMapsChildViewBinding != null && petalMapsChildViewBinding.getIsShowSlidingContainer();
}
public final void U3(View view) {
Activity activity = this.Z;
if (activity instanceof FragmentActivity) {
j2((FragmentActivity) activity, true);
}
}
public void U4(boolean z, int i2, View.OnClickListener onClickListener) {
PetalMapsChildViewBinding petalMapsChildViewBinding;
Context c2 = o41.c();
if (c2 == null || (petalMapsChildViewBinding = this.n0) == null) {
return;
}
if (!z) {
petalMapsChildViewBinding.buttonRideHailingCallRide.setEnabled(true);
this.n0.buttonRideHailingCallRide.setAlpha(1.0f);
this.n0.buttonRideHailingCallRide.setText(c2.getString(R.string.ride_hailing_install_app));
im4.f("MapUIController", "App is not installed on device");
} else if (i2 == 0) {
petalMapsChildViewBinding.buttonRideHailingCallRide.setEnabled(false);
this.n0.buttonRideHailingCallRide.setAlpha(0.5f);
this.n0.buttonRideHailingCallRide.setText(c2.getResources().getQuantityString(R.plurals.ride_hailing_call_ride_button_car_selected, i2, Integer.valueOf(i2)));
im4.f("MapUIController", "App is installed but no selected ride");
} else {
petalMapsChildViewBinding.buttonRideHailingCallRide.setEnabled(true);
this.n0.buttonRideHailingCallRide.setAlpha(1.0f);
this.n0.buttonRideHailingCallRide.setText(c2.getResources().getQuantityString(R.plurals.ride_hailing_call_ride_button_car_selected, i2, Integer.valueOf(i2)));
}
if (onClickListener != null) {
this.n0.buttonRideHailingCallRide.setOnClickListener(onClickListener);
}
}
public void U5() {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
petalMapsToolbarBinding.setIsTopSearchButtonVisible(true);
this.o0.searchInMapButton.setEnabled(false);
this.o0.searchLoading.setVisibility(0);
this.o0.searchInMapButton.setText(o41.f(R.string.along_searching_str));
}
public ActivityPetalMapsBinding V1() {
return this.l0;
}
public boolean V2() {
return this.d0;
}
public void V4(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
petalMapsToolbarBinding.setIsAlongStopBackBtnVisible(z);
}
public void V5(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
petalMapsToolbarBinding.searchInMapButton.setEnabled(true);
this.o0.searchLoading.setVisibility(8);
this.o0.setIsTopSearchButtonVisible(z);
}
public void W0(FragmentActivity fragmentActivity) {
if (this.n0 == null || this.o0 == null || this.p0 == null) {
return;
}
LocationHelper.v().changeLocationDefault();
hideSlidingContainer();
q2();
r5(false);
this.p0.setShowBottomNav(false);
hm4.p("MapUIController", "changeToNavigationPage is isLocationBtnVisible: " + this.i);
this.o0.setIsLocationBtnVisible(false);
this.o0.setIsLayerBtnVisible(false);
this.o0.setIfCompassBtnVisibility(false);
x1().setIsPetalLogoVisible(false);
LocationHelper.v().setLocationMarkerVisibility(false);
RouteDataManager.b().O(false);
hideLogo();
this.n0.bottomLayout.setViewName(-1);
if (k06.x()) {
if (o9a.d() && fragmentActivity != null && (fragmentActivity instanceof PetalMapsActivity)) {
((PetalMapsActivity) fragmentActivity).setNavigationBarColr(false);
ef9.b(false, fragmentActivity);
return;
}
return;
}
if (o9a.d() == o9a.i() || fragmentActivity == null || !(fragmentActivity instanceof PetalMapsActivity)) {
return;
}
((PetalMapsActivity) fragmentActivity).setNavigationBarColr(o9a.i());
ef9.b(o9a.i(), fragmentActivity);
}
public void W1() {
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding == null || !petalMapsChildViewBinding.getIsShowSlidingContainer()) {
return;
}
hideSlidingContainer();
}
public boolean W2() {
x9 x9Var = this.T;
if (x9Var == null) {
return false;
}
return x9Var.O();
}
public void W4(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.petalMapsLayerBtn.setVisibility(z ? 0 : 8);
}
}
public final void W5() {
MapConfigDataTools.r().t(1028, Boolean.class, new j());
}
public void X0() {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
petalMapsToolbarBinding.setIsTrafficBtnVisible(false);
this.o0.setIsLayerBtnVisible(true);
this.o0.setIfCompassBtnVisibility(false);
}
public void X1(boolean z, float f2) {
PetalMapsChildViewBinding petalMapsChildViewBinding;
PetalMapsOtherViewBinding petalMapsOtherViewBinding = this.m0;
if (petalMapsOtherViewBinding == null || (petalMapsChildViewBinding = this.n0) == null) {
return;
}
petalMapsOtherViewBinding.setIsShowOpacityCoatingView(z && !petalMapsChildViewBinding.getShowFragmentContainer());
R0(f2);
}
public void X2(FragmentActivity fragmentActivity, String str) {
if (this.l0 == null || c06.b()) {
handleOpacityCoatingViewEnable(false);
return;
}
String str2 = this.F;
if (str2 != null) {
this.G.push(str2);
}
this.E = new TopOperationFragment();
Bundle bundle = new Bundle();
bundle.putString("url_path_operation", str);
bundle.putBoolean("isShowTitleBar", false);
this.F = TopOperationFragment.class.getSimpleName();
this.E.setArguments(bundle);
SlidingContainerManager.d().D(fragmentActivity, this.E);
SlidingContainerManager.d().B(false);
}
public final void X3(final PetalMapsActivity petalMapsActivity) {
com.huawei.maps.app.common.utils.task.a.f(com.huawei.maps.app.common.utils.task.a.a("MapUIController", "showQiblaFragment", new Runnable() {
@Override
public final void run() {
a.W3(PetalMapsActivity.this);
}
}), this.c);
}
public void X4(boolean z) {
this.P = z;
}
public final void X5() {
MapConfigDataTools.s().t(1029, String.class, new g());
}
public void Y0() {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
petalMapsToolbarBinding.setShowNaviCompletedPage(c06.g());
x1().setIsPetalLogoVisible(true);
this.o0.setIsLayerBtnVisible(true);
this.o0.setIsTrafficBtnVisible(false);
j5(!c06.g());
x1().showLogo(false);
}
public void Y1(boolean z) {
MapHelper.F2().f7(z);
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.setIsTrafficEnable(z);
}
}
public void Y2(FragmentActivity fragmentActivity, String str, boolean z) {
if (this.l0 == null) {
handleOpacityCoatingViewEnable(false);
return;
}
String str2 = this.F;
if (str2 != null) {
this.G.push(str2);
}
this.E = new TopOperationFragment();
Bundle bundle = new Bundle();
bundle.putString("url_path_operation", str);
bundle.putBoolean("isShowTitleBar", true);
bundle.putBoolean("isShowBackButton", z);
bundle.putBoolean("isShowShare", false);
if (z) {
bundle.putString("title", o41.c().getString(R.string.meetkai_text));
}
this.F = TopOperationFragment.class.getSimpleName();
this.E.setArguments(bundle);
SlidingContainerManager.d().D(fragmentActivity, this.E);
SlidingContainerManager.d().B(false);
}
public final void Y3(PetalMapsToolbarBinding petalMapsToolbarBinding) {
this.o0.setIsResultBadVisible(true);
}
public void Y4(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
petalMapsToolbarBinding.setIsRoutePreferenceVisible(z);
}
public void Y5(ActivityViewModel activityViewModel) {
PetalMapsToolbarBinding petalMapsToolbarBinding;
if (activityViewModel == null || (petalMapsToolbarBinding = this.o0) == null) {
return;
}
petalMapsToolbarBinding.weatherBadge.setVm(activityViewModel);
}
public void Z0() {
MapNaviPath naviPath = it3.x().getNaviPath();
boolean z = (zb3.a.x() || fo7.f().n() || x1().R2() || x1().isShowAlongCard()) ? false : true;
if (qc6.c(naviPath) && z) {
x1().u5(kw5.c(naviPath), true);
}
}
public boolean Z1() {
if (this.n0 == null) {
return false;
}
FragmentActivity fragmentActivity = this.Z;
return (fragmentActivity instanceof FragmentActivity) && fragmentActivity.getSupportFragmentManager().findFragmentById(this.n0.carPageContainer.getId()) != null;
}
public void Z2(FragmentActivity fragmentActivity, String str) {
SafeBundle safeBundle = new SafeBundle();
safeBundle.putString("url_path_operation", str);
safeBundle.putBoolean("isShowTitleBar", false);
try {
Navigation.findNavController(fragmentActivity, R.id.fragment_list).navigate(R.id.fragment_operation, safeBundle.getBundle());
} catch (IllegalArgumentException unused) {
hm4.h("MapUIController", "does not have a NavController");
}
}
public final void Z3(View view) {
o2("1");
}
public void Z4(boolean z) {
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding == null) {
return;
}
petalMapsChildViewBinding.setIsShowCallRideContainer(z);
}
public void Z5(boolean z) {
PetalMapsChildViewBinding petalMapsChildViewBinding;
if (this.o0 == null || (petalMapsChildViewBinding = this.n0) == null) {
return;
}
petalMapsChildViewBinding.bottomLayout.setRoutePreferenceVisible(true);
if (!z) {
this.n0.bottomLayout.setRoutePreference(o41.c().getString(R.string.navi_route_preference));
this.o0.setIsRoutePreferenceVisible(false);
} else if (ct3.W(o41.c())) {
this.o0.setIsRoutePreferenceVisible(false);
this.n0.bottomLayout.setRoutePreference(o41.c().getString(R.string.navi_avoid_ferry));
} else {
this.o0.setIsRoutePreferenceVisible(true);
this.o0.setRoutePreference(o41.c().getString(R.string.navi_avoid_ferry));
}
if (!this.n0.getInNav()) {
gn4.i().u();
}
this.n0.bottomLayout.postDelayed(new Runnable() {
@Override
public final void run() {
a.this.F0();
}
}, 300L);
}
public final void a1() {
if (isInTeamDetailOrTeamMemberInfoPage()) {
h2();
}
}
public void a2() {
m4();
if (this.U) {
c2();
} else {
Optional.ofNullable(this.T).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
((x9) obj).D();
}
});
}
}
public final void a4(FragmentActivity fragmentActivity) {
SlidingContainerManager.d().D(fragmentActivity, this.E);
}
public void a5(boolean z) {
if (this.r0 == null) {
return;
}
if (c06.g() || c06.e()) {
this.r0.setIsShowScrollPageLayout(false);
} else {
this.r0.setIsShowScrollPageLayout(z);
}
}
public void a6(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
petalMapsToolbarBinding.weatherBadgeAndLogo.setVisibility(z ? 0 : 8);
}
public void addTransportIconClickListener(final View.OnClickListener onClickListener) {
if (onClickListener == null) {
return;
}
Optional.ofNullable(this.o0).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
a.b3(onClickListener, (PetalMapsToolbarBinding) obj);
}
});
}
public void b1() {
if (isInTeamDetailOrTeamMemberInfoPage()) {
F6();
}
}
public void b2() {
Optional.ofNullable(this.T).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
((x9) obj).E();
}
});
}
public final void b4(final FragmentActivity fragmentActivity) {
com.huawei.maps.app.common.utils.task.a.f(com.huawei.maps.app.common.utils.task.a.a("MapUIController", "showTrafficEventPushFragment", new Runnable() {
@Override
public final void run() {
a.this.a4(fragmentActivity);
}
}), this.c);
}
public void b5(boolean z) {
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding == null) {
return;
}
petalMapsChildViewBinding.setIsShowSlidingContainer(z);
}
public final void b6(AchievementInfo achievementInfo, int i2) {
int i3;
int i4;
int b2 = eq5.d().b(i2);
if (achievementInfo == null || i2 != 0) {
i3 = 0;
i4 = 0;
} else {
this.I = achievementInfo;
i4 = (int) achievementInfo.getThreshold();
int type = achievementInfo.getType();
if (type == 1) {
b2 = R.drawable.map_achievement_km;
i3 = R.plurals.map_achievement_mileage_kilometers;
n5.e();
} else if (type == 2) {
b2 = R.drawable.map_achievement_km;
i3 = R.plurals.map_achievement_mileage_miles;
n5.f();
} else if (type != 3) {
i3 = 0;
} else {
b2 = R.drawable.map_achievement_time;
i3 = R.plurals.achievement_navigation;
n5.h();
}
}
hm4.p("MapUIController", "desId = " + i3 + "; threshold = " + i4);
cq5.a().d(i3 != 0);
n5(false);
NaviCompletedBottomSheetFragment naviCompletedBottomSheetFragment = this.M;
if (naviCompletedBottomSheetFragment != null) {
naviCompletedBottomSheetFragment.W(o41.e(b2));
}
NaviCompletedNonDriveFragment naviCompletedNonDriveFragment = this.N;
if (naviCompletedNonDriveFragment != null) {
naviCompletedNonDriveFragment.q(o41.e(b2));
}
if (i3 == 0 || i4 == 0) {
return;
}
cq5.a().h(o41.c().getResources().getQuantityString(i3, i4, Integer.valueOf(i4)));
}
public void bindRecyclerView(MapRecyclerView mapRecyclerView) {
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding != null) {
homeSlideLayoutBinding.scrollPageLayout.setAssociatedRecyclerView(mapRecyclerView);
}
}
public void bindScrollView(AppBarLayout appBarLayout) {
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding != null) {
homeSlideLayoutBinding.scrollPageLayout.setAssociatedScrollView(appBarLayout);
}
}
public void c2() {
Optional.ofNullable(this.T).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
((x9) obj).F();
}
});
}
public final void c3(int i2) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null || this.Z == null) {
return;
}
petalMapsToolbarBinding.weatherBadge.setVisibility(i2);
x0();
}
public final void c4(View view) {
StringBuilder sb = new StringBuilder();
sb.append(" startTransNavi mActivity ");
sb.append(this.Z == null);
hm4.f("MapUIController", sb.toString());
Activity activity = this.Z;
if (activity != null) {
j2a.a.q(activity);
}
}
public void c5(boolean z) {
PetalMapsOtherViewBinding petalMapsOtherViewBinding = this.m0;
if (petalMapsOtherViewBinding == null) {
return;
}
petalMapsOtherViewBinding.petalMapsToolbar.getRoot().setVisibility(z ? 0 : 8);
}
public void c6(boolean z, int i2) {
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding == null) {
hm4.h("MapUIController", "mBinding is null.");
return;
}
petalMapsChildViewBinding.container.removeAllViews();
if (!z) {
this.u0 = null;
return;
}
B2(i2);
B0(ct3.A(o41.b()));
boolean q = it3.x().q(i2);
LayoutAddReminderBinding layoutAddReminderBinding = this.u0;
if (layoutAddReminderBinding == null) {
hm4.h("MapUIController", "layoutAddReminderBinding is null.");
return;
}
layoutAddReminderBinding.setIsAdd(q);
this.u0.setIsServiceClose(false);
this.n0.container.setVisibility(0);
this.n0.container.addView(this.u0.getRoot());
}
public void clearCustomShareFragment() {
if (this.n != null) {
this.n = null;
}
}
public void clearNaviData() {
hp5.D().clearNavLineData();
if (k06.r()) {
DriveNavHelper.v().D0(null);
} else {
yta.s().M(null);
}
}
public void closeCardPage() {
FragmentManager supportFragmentManager;
Fragment findFragmentById;
if (this.n0 != null) {
FragmentActivity fragmentActivity = this.Z;
if ((fragmentActivity instanceof FragmentActivity) && (findFragmentById = (supportFragmentManager = fragmentActivity.getSupportFragmentManager()).findFragmentById(this.n0.carPageContainer.getId())) != null) {
supportFragmentManager.beginTransaction().remove(findFragmentById).commitAllowingStateLoss();
}
DetailReportUtil.J(this.w);
this.n0.carPageContainer.setVisibility(8);
this.n0.carPageContainer.removeAllViews();
if (TextUtils.isEmpty(ap6.a().b()) && I2()) {
p6((FragmentActivity) this.l0.getRoot().getContext());
}
setFromLayer(Boolean.FALSE);
}
}
public void conditionQuantityTipsRequest(boolean z) {
if (!z) {
hm4.p("MapUIController", "TrafficEnable is false");
return;
}
ox6 ox6Var = ox6.a;
if (ox6Var.c() != null) {
ox6Var.c().requestGetTotalEventCount(false);
} else {
hm4.h("MapUIController", "ConditionQuantityViewModel is null");
}
}
public final void d1() {
NewRoadFeedbackViewModel newRoadFeedbackViewModel = this.y;
if (newRoadFeedbackViewModel == null || newRoadFeedbackViewModel.w() == null) {
return;
}
this.y.h();
}
public void d2() {
BaseFragment baseFragment = this.E;
if (baseFragment != null && (baseFragment instanceof AlongSearchInfoFragment)) {
W1();
}
}
public final void d4(View view) {
Activity activity = this.Z;
if (activity != null) {
j2a.a.f(activity);
}
}
public void d5(boolean z) {
this.a = z;
}
public void d6(FragmentActivity fragmentActivity, List<SearchResultFilterClassify> list) {
if (this.l0 == null || fragmentActivity == null || fragmentActivity.isFinishing() || this.r0 == null) {
handleOpacityCoatingViewEnable(false);
return;
}
String str = this.F;
if (str != null) {
this.G.push(str);
}
j5(false);
this.E = new AllFilterFragment();
this.F = AllFilterFragment.class.getSimpleName();
SlidingContainerManager.d().D(fragmentActivity, this.E);
}
public void dismissPermissionDialog() {
MapAlertDialog mapAlertDialog = this.l;
if (mapAlertDialog != null && mapAlertDialog.v()) {
this.l.m();
}
this.l = null;
this.g0 = null;
}
public void dismissPoiOfflineDialog() {
if (this.b0 != null) {
this.b0 = null;
}
MapAlertDialog mapAlertDialog = this.a0;
if (mapAlertDialog != null) {
mapAlertDialog.m();
this.a0.k();
this.a0 = null;
}
}
public void dismissPoiPicturesPage(Activity activity) {
if (activity instanceof PetalMapsActivity) {
nx6.a.e();
}
}
public void dynamicCardJump(NavController navController, String str, Object obj) {
qd2.f(navController, str, obj, this.H);
}
public void e1() {
this.A = null;
}
public void e2() {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.setIsImmerseMode(true);
}
}
public final void e4(View view) {
Q6();
}
public void e5() {
CameraPosition n2 = MapHelper.F2().n2();
LatLng myLocation = LocationHelper.v().getMyLocation();
if (n2 != null) {
setLastCameraPosition(new CameraPosition(myLocation, n2.zoom, n2.tilt, n2.bearing));
}
}
public void e6(final List<Site> list) {
hm4.p("MapUIController", "showAlongCard : " + this.U);
if (this.U) {
this.U = false;
return;
}
Optional.ofNullable(this.o0).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
a.this.H3((PetalMapsToolbarBinding) obj);
}
});
x2();
Optional.ofNullable(this.T).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
((x9) obj).l0(list);
}
});
}
public void enableLocationPermission() {
Object obj = this.Z;
if (obj == null || !(obj instanceof PetalMapsActivity)) {
return;
}
ml4.d((PetalMapsActivity) obj);
}
public void endCruise(BaseActivity baseActivity) {
if (!com.huawei.maps.businessbase.manager.location.a.z() || this.B == null) {
return;
}
j1(baseActivity);
}
public void executeCommutePush(Location location) {
new w51().s(true, location);
}
public void exitTracelessModeAndRebootApp() {
Context c2 = o41.c();
if (c2 == null) {
return;
}
try {
Thread.sleep(1000L);
IntentUtils.safeStartActivity(c2, Intent.makeRestartActivityTask(c2.getPackageManager().getLaunchIntentForPackage(c2.getPackageName()).getComponent()));
} catch (InterruptedException unused) {
hm4.h("MapUIController", "sleep interrupted");
}
Process.killProcess(Process.myPid());
}
public void exitWeatherPage() {
ActivityPetalMapsBinding activityPetalMapsBinding = this.l0;
if (activityPetalMapsBinding != null && this.j0 && !this.a) {
this.j0 = false;
p6((FragmentActivity) activityPetalMapsBinding.getRoot().getContext());
}
if (this.a) {
this.a = false;
}
}
public void f1() {
MapAlertDialog mapAlertDialog = this.k;
if (mapAlertDialog == null || !mapAlertDialog.v()) {
return;
}
this.k.m();
}
public void f2() {
if (this.l0 != null) {
SlidingContainerManager.d().f(this.N);
this.N = null;
}
}
public final void f3(PetalMapsToolbarBinding petalMapsToolbarBinding) {
this.o0.setIsResultBadVisible(false);
}
public final void f4(View view) {
Q6();
}
public void f5(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.setIsLayerBtnVisible(z);
}
}
public void f6(FragmentActivity fragmentActivity) {
if (this.l0 == null) {
return;
}
String str = this.F;
if (str != null) {
this.G.push(str);
}
fo7.f().h();
u5(null, false);
this.E = new AlongSearchInfoFragment();
this.F = AlongSearchInfoFragment.class.getSimpleName();
SlidingContainerManager.d().D(fragmentActivity, this.E);
}
public String formatCurrencyPrice(@NotNull String str, double d2, int i2) {
try {
NumberFormat currencyInstance = NumberFormat.getCurrencyInstance();
currencyInstance.setMaximumFractionDigits(i2);
currencyInstance.setCurrency(Currency.getInstance(str));
return currencyInstance.format(d2);
} catch (IllegalArgumentException | NullPointerException unused) {
hm4.h("MapUIController", "Format currency fail");
return RoadReportType.CAMERA_INCORRECT;
}
}
public double formatStrPrice(String str) {
if (TextUtils.isEmpty(str)) {
return 0.0d;
}
try {
return !str.contains(",") ? Double.parseDouble(str) : Double.parseDouble(str.replaceAll("[^0-9]", "."));
} catch (NumberFormatException unused) {
hm4.h("MapUIController", "Price formatting error");
return 0.0d;
}
}
public void g1(float f2) {
if (f2 >= 0.0f) {
try {
hm4.f("MapUIController", "dealScrollProgressChanged:" + f2);
BigDecimal bigDecimal = new BigDecimal((double) f2);
x1().R0(new BigDecimal("1").subtract(bigDecimal).multiply(new BigDecimal("0.3")).floatValue());
} catch (NumberFormatException unused) {
hm4.f("MapUIController", "NumberFormatException: Infinite or NaN");
}
}
}
public void g2() {
BaseFragment baseFragment = this.E;
if (baseFragment == null) {
return;
}
if (baseFragment instanceof LanguageFragment) {
W1();
}
if (this.E instanceof LanguageNaviSettingFragment) {
W1();
}
}
public final void g4(View view) {
Activity activity = this.Z;
if (activity != null) {
j2a.a.f(activity);
}
}
public void g5(String str, String str2) {
if (TextUtils.isEmpty(str)) {
W5();
}
if (TextUtils.isEmpty(str2)) {
X5();
}
}
public void g6(FragmentActivity fragmentActivity) {
if (this.l0 == null) {
return;
}
String str = this.F;
if (str != null) {
this.G.push(str);
}
this.E = new AspiegelLocationFragment();
this.F = AspiegelLocationFragment.class.getSimpleName();
SlidingContainerManager.d().D(fragmentActivity, this.E);
}
public int getCommutingType() {
w51 w51Var = new w51();
w51Var.V((CommonAddressRecordsViewModel.a) null, true);
return w51Var.z();
}
public boolean getCruiseIsDark() {
Boolean bool = (Boolean) rf1.a().b().getValue();
if (bool == null) {
return false;
}
return bool.booleanValue();
}
public String getGasUpdateTimeStr() {
return o41.f(R.string.gas_update_time);
}
public LaneGuide getHdmiNavLaneGuide() {
return uk3.L().N();
}
public boolean getIsExposureForPDC() {
return this.S;
}
public boolean getIsExposureForPRC() {
return this.R;
}
public LocationMarkerViewModel getLocationMarkerViewModel() {
return LocationHelper.v().getLocationMarkerViewModel();
}
public int getMapViewResultHeight() {
return this.L;
}
public String getOpenHoursStr(int i2) {
return String.format(Locale.getDefault(), o41.f(R.string.open_hours), Integer.valueOf(i2));
}
public boolean getShowScale() {
if (SlidingContainerManager.d().i() || L2()) {
return false;
}
BaseFragment baseFragment = this.E;
if (baseFragment == null || !(baseFragment instanceof AlongSearchInfoFragment)) {
return this.b;
}
return false;
}
public ViewDataBinding getSiteDetailBottomBind() {
PetalMapsOtherViewBinding petalMapsOtherViewBinding = this.m0;
if (petalMapsOtherViewBinding == null) {
return null;
}
return petalMapsOtherViewBinding.layoutSiteDetailBottom;
}
public Optional<LatLng> getSkyLatLng() {
return c31.h().g();
}
public int getSystemNavHeight() {
if (this.e) {
return this.h;
}
return 0;
}
public void gotoPOIDetailFromCard(Site site) {
jh8.h0(0);
zu1.d(1);
PetalMapsActivity petalMapsActivity = (PetalMapsActivity) this.l0.getRoot().getContext();
Bundle bundle = new Bundle();
bundle.putBoolean("from_card", true);
nx6.a.k(site, bundle, petalMapsActivity);
}
public void gotoRouteResultFromCard() {
RouteNavUtil.f((Activity) this.l0.getRoot().getContext());
Bundle bundle = new Bundle();
bundle.putBoolean("from_card", true);
RouteNavUtil.e((Activity) this.l0.getRoot().getContext(), bundle);
}
public void h1() {
Optional.ofNullable(this.h0).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
a.d3((PopupWindow) obj);
}
});
}
public void h2() {
TeamMemberListLayoutBinding teamMemberListLayoutBinding = this.q0;
if (teamMemberListLayoutBinding != null) {
teamMemberListLayoutBinding.setIsShowTeamMapMember(false);
}
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.setIsLayerBtnVisible(false);
}
}
public final void h5(int i2) {
if (this.o0 == null) {
return;
}
this.o0.petalMapsLocationBtn.setImageDrawable(o41.i(o41.c(), i2, o9a.d() ? R.color.map_location_icon_dark : R.color.map_location_icon));
}
public void h6(final String str) {
Optional.ofNullable(this.o0).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
a.this.J3(str, (PetalMapsToolbarBinding) obj);
}
});
}
public void handleCampass(CameraPosition cameraPosition) {
x1().K4(cameraPosition.bearing);
x1().J4(((cameraPosition.bearing == 0.0f && cameraPosition.tilt == 0.0f) || c06.b() || isInTeamDetailOrTeamMemberInfoPage()) ? false : true);
}
public void handleMeetkaiAds(CameraPosition cameraPosition) {
db5.a.b(ox6.a.s(), cameraPosition);
}
public void handleOpacityCoatingViewClickable() {
boolean W = ct3.W(o41.c());
if (W) {
handleOpacityCoatingViewEnable(!W);
MapHelper.F2().Y6(W);
} else {
boolean z = O2() && !c06.b();
handleOpacityCoatingViewEnable(z);
MapHelper.F2().Y6(!z);
}
}
public void handleOpacityCoatingViewEnable(boolean z) {
PetalMapsChildViewBinding petalMapsChildViewBinding;
PetalMapsOtherViewBinding petalMapsOtherViewBinding = this.m0;
if (petalMapsOtherViewBinding == null || (petalMapsChildViewBinding = this.n0) == null) {
return;
}
petalMapsOtherViewBinding.setIsShowOpacityCoatingView(z && !petalMapsChildViewBinding.getShowFragmentContainer());
R0(0.3f);
}
public void handleOpacityCoatingViewUnclickable() {
boolean W = ct3.W(o41.c());
if (W) {
handleOpacityCoatingViewEnable(!W);
} else {
handleOpacityCoatingViewEnable(O2());
}
}
public void handleOpacityUnClickViewEnable(boolean z) {
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding == null) {
return;
}
petalMapsChildViewBinding.setIsShowOpacityUnClickView(z);
R0(0.3f);
}
public void hideBottomNav() {
PetalMapsNavLayoutBinding petalMapsNavLayoutBinding = this.p0;
if (petalMapsNavLayoutBinding == null) {
return;
}
petalMapsNavLayoutBinding.setShowBottomNav(false);
}
public void hideCOVIDFragment(FragmentActivity fragmentActivity) {
PetalMapsChildViewBinding petalMapsChildViewBinding;
if (this.l0 == null || this.C == null || fragmentActivity == null || (petalMapsChildViewBinding = this.n0) == null) {
return;
}
petalMapsChildViewBinding.covidFragmentContainer.setVisibility(8);
this.n0.setInCOVIDFragment(false);
FragmentTransaction beginTransaction = fragmentActivity.getSupportFragmentManager().beginTransaction();
if (this.C.isAdded()) {
beginTransaction.remove(this.C);
}
beginTransaction.commitAllowingStateLoss();
if (this.j0) {
p6(fragmentActivity);
}
setFromLayer(Boolean.FALSE);
this.C = null;
}
public void hideCardPage() {
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding != null) {
petalMapsChildViewBinding.carPageContainer.setVisibility(8);
}
}
public void hideCustomShareFragment() {
ShareBottomSheetFragment shareBottomSheetFragment = this.n;
if (shareBottomSheetFragment == null || !shareBottomSheetFragment.isVisible()) {
return;
}
try {
this.n.dismiss();
this.n = null;
} catch (IllegalStateException unused) {
hm4.h("MapUIController", "dismiss IllegalStateException");
}
}
public void hideLogo() {
PetalMapsToolbarBinding petalMapsToolbarBinding;
if (this.n0 == null || (petalMapsToolbarBinding = this.o0) == null) {
return;
}
if (petalMapsToolbarBinding.logo.getVisibility() == 8 && this.o0.logoDrawingNo.getVisibility() == 8) {
return;
}
this.o0.logo.setVisibility(8);
this.o0.logoDrawingNo.setVisibility(8);
gn4.i().s(false);
}
public void n3() {
MapHelper.F2().d8(false);
if (this.o0 == null || this.n0 == null) {
hm4.h("MapUIController", "mBinding is null.");
return;
}
NavCommuteFragment navCommuteFragment = this.O;
if (navCommuteFragment != null) {
k2(navCommuteFragment.getActivity());
}
j5(true);
MapHelper.F2().q6(Boolean.TRUE);
c06.m(false);
x1().showWeatherBadge();
x1().showLogo(false);
MapHelper.F2().Z6(false);
this.o0.setIsLayerBtnVisible(true);
if (TextUtils.isEmpty(ap6.a().b())) {
showBottomNav();
}
x1().a5(true);
this.o0.setShowNaviCompletedPage(c06.g());
MapHelper.F2().j6();
if (!da4.a()) {
resetLocationBtn();
} else if (this.v0) {
this.v0 = false;
} else {
resetLocationBtn();
}
this.n0.container.removeAllViews();
this.n0.container.setVisibility(8);
this.n0.setShowNaviCompletedPage(false);
this.n0.setShowNonDriveCompletePage(false);
y2(true);
this.n0.navCompletedCoating.setVisibility(8);
this.n0.navCompletedCoatingTheme.setVisibility(8);
if (cq5.a().b == 0) {
NaviCompletedBottomSheetFragment naviCompletedBottomSheetFragment = this.M;
if (naviCompletedBottomSheetFragment != null) {
naviCompletedBottomSheetFragment.R();
}
r2();
this.n0.naviCompletedButtonsRoot.setVisibility(8);
d1();
l2();
} else {
f2();
this.n0.naviCompletedContainer.setVisibility(8);
}
cq5.a().c();
AchievementInfo achievementInfo = this.I;
if (achievementInfo != null) {
int type = achievementInfo.getType();
if (1 == type || 2 == type || 3 == type) {
showGpReview();
}
this.I = null;
}
ve8.p().m0();
if (MapHelper.F2().O2() != null) {
MapHelper.F2().j1(MapHelper.F2().O2());
}
ve8.p().l0(MapScrollLayout.ScrollTopBottomState.ENABLE);
ActivityViewModel activityViewModel = this.x;
if (activityViewModel != null) {
activityViewModel.q().postValue("012001");
}
l5(true);
if (TextUtils.isEmpty(kp9.o.a().j())) {
return;
}
x1().I5(true);
}
public void hideResultBadButton() {
if (k0a.k().m()) {
return;
}
Optional.ofNullable(this.o0).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
a.this.f3((PetalMapsToolbarBinding) obj);
}
});
}
public void hideSlidingContainer() {
if (this.l0 == null || qc6.b(this.E)) {
return;
}
if ((this.E instanceof LayerSettingFragment) && (this.Z instanceof FragmentActivity) && !this.G.isEmpty() && TrafficEventDetailMainFragment.class.getSimpleName().equals(this.G.pop())) {
H6((FragmentActivity) this.Z, com.huawei.maps.app.petalmaps.trafficevent.a.v());
return;
}
BaseFragment baseFragment = this.E;
if (baseFragment instanceof RoadConditionDetailSelectFragment) {
Activity activity = this.Z;
if (activity instanceof FragmentActivity) {
x6((FragmentActivity) activity, "1");
return;
}
}
if ((baseFragment instanceof RoadConditionSelectFragment) && (this.Z instanceof FragmentActivity)) {
handleOpacityUnClickViewEnable(false);
DriveNavHelper.v().Q0(true);
K0();
return;
}
if (baseFragment instanceof TrafficEventDetailMainFragment) {
if (!s68.a().d()) {
x1().scrollWeatherBadge(ve8.p().m());
x1().scrollLocationButton(ve8.p().m());
}
NavPopEventHelper.e().k(3);
}
if (this.E instanceof TeamMapMemberInfoFragment) {
NavPopEventHelper.e().k(14);
}
BaseFragment baseFragment2 = this.E;
if (baseFragment2 instanceof TeamMapDestinationInfoByMemberFragment) {
NavPopEventHelper.e().k(15);
return;
}
if (baseFragment2 instanceof AlongSearchInfoFragment) {
NavPopEventHelper.e().k(7);
}
if (this.E instanceof AllFilterFragment) {
NavPopEventHelper.e().k(16);
}
K0();
Optional.ofNullable(this.x).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
a.h3((ActivityViewModel) obj);
}
});
}
public void hideTeamMapDestinationInfoByMemberFragment() {
BaseFragment baseFragment;
if (this.l0 == null || (baseFragment = this.E) == null || !(baseFragment instanceof TeamMapDestinationInfoByMemberFragment)) {
return;
}
K0();
}
public void hideTeamMapMemberInfoFragment() {
BaseFragment baseFragment;
if (this.l0 == null || (baseFragment = this.E) == null || !(baseFragment instanceof TeamMapMemberInfoFragment)) {
return;
}
K0();
}
public void hideTrafficDialog() {
BaseFragment baseFragment;
if (this.l0 == null || (baseFragment = this.E) == null || !(baseFragment instanceof TrafficEventDetailMainFragment)) {
return;
}
K0();
}
public void hideWeatherBadge() {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
petalMapsToolbarBinding.weatherBadge.a();
}
@SuppressLint({"UnsafeOptInUsageError"})
public void i1() {
if (B0 == null || B0.i0 == null) {
return;
}
B0.i0.K(false);
if (this.p0 != null) {
com.google.android.material.badge.a.d(B0.i0, this.p0.bottomNav);
}
B0.i0 = null;
}
public void i2() {
TeamMemberListLayoutBinding teamMemberListLayoutBinding = this.q0;
if (teamMemberListLayoutBinding != null) {
teamMemberListLayoutBinding.setIsShowTeamMapMember(false);
}
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.setIsLayerBtnVisible(true);
}
}
public final void i5(int i2) {
if (this.o0 == null) {
return;
}
int a = o41.a(o41.c(), i2);
this.o0.petalMapsLocationBtn.setPadding(a, a, a, a);
}
public void i6() {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.setIsImmerseMode(false);
}
}
public void intersectionDebug(String str) {
t64.a(str);
}
public boolean isAlongSearchTrafficEvent() {
x9 x9Var = this.T;
if (x9Var == null) {
return false;
}
return x9Var.L();
}
public boolean isCheckPoiOffline() {
return this.c0;
}
public boolean isHdmiNav() {
return cl3.r().C();
}
public boolean isInTeamDetailOrTeamMemberInfoPage() {
Object obj = this.Z;
if (obj != null && (obj instanceof PetalMapsActivity)) {
BaseFragment<?> g2 = nx6.a.g((PetalMapsActivity) obj);
if ((g2 instanceof TeamMapTeamDetailFragment) || (g2 instanceof TeamMapMemberInfoFragment) || (g2 instanceof TeamMapDestinationDetailFragment)) {
return true;
}
}
return false;
}
public boolean isLogoVisibility() {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return false;
}
return petalMapsToolbarBinding.logo.getVisibility() == 0 || petalMapsToolbarBinding.logoDrawingNo.getVisibility() == 0;
}
public boolean isNaviCompletedPageShowing() {
if (this.l0 != null) {
return c06.g();
}
hm4.h("MapUIController", "mBinding is null.");
return false;
}
public boolean isOfflineData(String str) {
if (TextUtils.isEmpty(str)) {
return false;
}
return str.matches("^[0-9]{13}$");
}
public boolean isPoiTypeOnlySupportUgcAdd(Site site) {
return b37.d(site);
}
public boolean isReportWithRollbackSRP() {
return this.V;
}
public boolean isSearchInExploreImpl() {
Object obj = this.Z;
if (obj == null || !(obj instanceof PetalMapsActivity)) {
return false;
}
return nx6.a.g((PetalMapsActivity) obj) instanceof ExploreHomeFragment;
}
public boolean isShowAlongCard() {
x9 x9Var = this.T;
if (x9Var == null) {
return false;
}
return x9Var.N();
}
public boolean isShowAlongSearchInfoFragment() {
return TextUtils.equals(this.F, AlongSearchInfoFragment.class.getSimpleName());
}
public boolean isUgcAddEnable() {
return b37.h();
}
public boolean isUgcMoidfyEnable(Site site) {
return b37.k(site);
}
public void j1(FragmentActivity fragmentActivity) {
if (this.m0 == null || this.B == null || fragmentActivity == null) {
return;
}
Optional.ofNullable(this.x).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
a.e3((ActivityViewModel) obj);
}
});
MapHelper.F2().S7(true);
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding != null) {
petalMapsChildViewBinding.setInNav(false);
}
this.m0.setInCruiseNav(false);
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding != null) {
homeSlideLayoutBinding.setInNav(false);
}
FragmentTransaction beginTransaction = fragmentActivity.getSupportFragmentManager().beginTransaction();
try {
beginTransaction.remove(this.B);
} catch (IllegalStateException unused) {
hm4.h("MapUIController", "endCruiseNav IllegalStateException");
}
beginTransaction.commitAllowingStateLoss();
this.B = null;
hm4.f("MapUIController", "mCruiseNavFragment = null");
}
public void j2(FragmentActivity fragmentActivity, boolean z) {
MultiFilterFragment multiFilterFragment;
if (this.l0 == null || (multiFilterFragment = this.D) == null || fragmentActivity == null || this.n0 == null) {
return;
}
if (z) {
multiFilterFragment.i();
}
this.n0.searchMultiFilterContainer.setOnClickListener(null);
this.n0.setShowMultiFilter(false);
FragmentTransaction beginTransaction = fragmentActivity.getSupportFragmentManager().beginTransaction();
if (this.D.isAdded()) {
beginTransaction.remove(this.D);
}
beginTransaction.commitAllowingStateLoss();
if (this.j0) {
p6(fragmentActivity);
}
setFromLayer(Boolean.FALSE);
this.D = null;
}
public final void j3(ViewStub viewStub, View view) {
T4(this.k0);
}
public final void j4(boolean z, final PetalMapsToolbarBinding petalMapsToolbarBinding) {
final MapCustomBubbleLayout mapCustomBubbleLayout = petalMapsToolbarBinding.badResultBubbleLayout;
if ((mapCustomBubbleLayout.getVisibility() == 0) == z) {
return;
}
if (z && mapCustomBubbleLayout.getArrowPosition() == 0) {
mapCustomBubbleLayout.setBubbleColor(0);
mapCustomBubbleLayout.post(new Runnable() {
@Override
public final void run() {
a.i4(PetalMapsToolbarBinding.this, mapCustomBubbleLayout);
}
});
} else {
mapCustomBubbleLayout.setArrowPosition(0);
}
this.o0.setIsFeedbackBubbleVisible(z);
}
public void j5(boolean z) {
if (this.o0 != null) {
boolean z2 = false;
boolean z3 = z && !L2();
boolean z4 = (c06.b() || this.Q) ? false : true;
boolean z5 = (zb3.a.x() || fo7.f().n()) ? false : true;
if (z3 && z4 && z5) {
z2 = true;
}
this.i = z2;
StringBuilder sb = new StringBuilder();
sb.append("setLocationBtnVisible is isLocationBtnVisible: ");
sb.append(this.i);
sb.append(" ,locationBtnVisible: ");
sb.append(z);
sb.append(" ,!isLayersettingFragmentShowing(): ");
sb.append(!L2());
sb.append(" ,!mInRouteAddressEditFragment: ");
sb.append(!this.Q);
sb.append(" ,!FutureForecastHelper.INSTANCE.isFutureForecastPage(): ");
sb.append(!r4.x());
sb.append(" ,!RestrictedHelper.getInstance().isShowRestrictedPage(): ");
sb.append(!fo7.f().n());
sb.append(" ,!NaviStateManager.getIsNavigation(): ");
sb.append(!c06.b());
hm4.p("MapUIController", sb.toString());
this.o0.setIsLocationBtnVisible(this.i);
}
}
public void j6(FragmentActivity fragmentActivity) {
if (this.n0 == null || fragmentActivity == null) {
return;
}
this.C = new COVIDFragment();
this.n0.setInCOVIDFragment(true);
FragmentTransaction beginTransaction = fragmentActivity.getSupportFragmentManager().beginTransaction();
beginTransaction.replace(R.id.covid_fragment_container, this.C);
beginTransaction.commitAllowingStateLoss();
}
public void jumpContentCenterPage(Context context, String str) {
xb1.b(context, str);
}
public void jumpPrivacyDeclareDetails(Context context, String str) {
PrivacyDeclareDetailsActivity.S(context, str);
}
public void jumpPrivacyPage(Context context) {
AgreementRequestHelper.a1(context, "privacy-statement.htm");
}
public void k1(FragmentActivity fragmentActivity) {
if (this.m0 == null || this.A == null || fragmentActivity == null) {
return;
}
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding != null) {
petalMapsChildViewBinding.setInNav(false);
}
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding != null) {
homeSlideLayoutBinding.setInNav(false);
}
FragmentTransaction beginTransaction = fragmentActivity.getSupportFragmentManager().beginTransaction();
beginTransaction.remove(this.A);
beginTransaction.commitAllowingStateLoss();
this.A = null;
hm4.f("MapUIController", "mNavFragment = null");
}
public void k2(FragmentActivity fragmentActivity) {
hm4.p("MapUIController", "hideNavCommuteDialog");
if (this.O != null && fragmentActivity != null) {
FragmentTransaction beginTransaction = fragmentActivity.getSupportFragmentManager().beginTransaction();
beginTransaction.remove(this.O);
beginTransaction.commitAllowingStateLoss();
this.O = null;
}
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding != null) {
petalMapsChildViewBinding.commuteDialogContainer.removeAllViews();
this.n0.commuteDialogContainer.setVisibility(8);
}
}
public final void k3() {
PetalMapsToolbarBinding petalMapsToolbarBinding;
if (this.k0 == null && (petalMapsToolbarBinding = this.o0) != null) {
ViewStubProxy viewStubProxy = petalMapsToolbarBinding.vsIndoorSwitchview;
if (!viewStubProxy.isInflated()) {
hm4.p("MapUIController", "MAP LAUNCH IndoorView start");
ViewStub viewStub = viewStubProxy.getViewStub();
if (viewStub != null) {
hm4.p("MapUIController", "MAP LAUNCH IndoorView end");
viewStub.inflate();
this.k0 = (LayoutIndoorSwitchViewBinding) viewStubProxy.getBinding();
viewStub.setOnInflateListener(new ViewStub.OnInflateListener() {
@Override
public final void onInflate(ViewStub viewStub2, View view) {
a.this.j3(viewStub2, view);
}
});
}
}
}
LayoutIndoorSwitchViewBinding layoutIndoorSwitchViewBinding = this.k0;
if (layoutIndoorSwitchViewBinding != null) {
T4(layoutIndoorSwitchViewBinding);
}
}
public final void k4(int i2) {
fk2.b(new e(i2));
}
public void k5(BadgeDrawable badgeDrawable) {
this.i0 = badgeDrawable;
}
public void k6(FragmentActivity fragmentActivity, CommonH5Bean commonH5Bean) {
if (this.l0 == null || commonH5Bean == null) {
return;
}
String url = commonH5Bean.getUrl();
if (!tha.a(url) && !k.t4(url)) {
hm4.h("MapUIController", "showCommonH5Fragment url Not in the trustlist");
return;
}
if (fragmentActivity instanceof PetalMapsActivity) {
PetalMapsActivity petalMapsActivity = (PetalMapsActivity) fragmentActivity;
String str = this.F;
if (str != null) {
this.G.push(str);
}
SafeBundle safeBundle = new SafeBundle();
safeBundle.putString("web_view_arg_url", commonH5Bean.getUrl());
safeBundle.putString("web_view_arg_title", commonH5Bean.getTitle());
safeBundle.putBoolean("web_view_arg_show_refresh_button", commonH5Bean.isRefreshButton());
safeBundle.putBoolean("web_view_arg_show_icon", commonH5Bean.isShowIcon());
this.E = new CommonH5Fragment(safeBundle);
this.F = CommonH5Fragment.class.getSimpleName();
SlidingContainerManager.d().D(petalMapsActivity, this.E);
}
}
public void l1() {
hm4.f("MapUIController", "formatHeightForSelectPoiPage");
ve8.p().i();
hideBottomNav();
setLocationImageMarginBottom(ct3.b(o41.b(), 308.0f));
}
public final void l2() {
if (this.l0 != null) {
SlidingContainerManager.d().f(this.M);
this.M = null;
}
}
public final void l3(View view) {
NewRoadFeedbackViewModel newRoadFeedbackViewModel = this.y;
if (newRoadFeedbackViewModel != null) {
List list = (List) newRoadFeedbackViewModel.w().getValue();
if (this.y.w() == null || list == null || list.isEmpty()) {
n3();
} else {
m6();
}
}
}
public void l4() {
U0(c06.d());
}
public void l5(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding;
if (this.l0 == null || (petalMapsToolbarBinding = this.o0) == null) {
return;
}
if (!z) {
petalMapsToolbarBinding.layoutNewsHome.setVisibility(8);
return;
}
if (k0a.k().m()) {
this.o0.layoutNewsHome.setVisibility(8);
} else if (o4()) {
this.o0.layoutNewsHome.setVisibility(0);
}
p19.F().s2(false);
}
public void l6() {
if (this.n0 == null || isShowAlongSearchInfoFragment() || L2() || isShowAlongCard() || R2()) {
return;
}
boolean U = p19.F().U();
this.n0.bottomLayout.setRoutePreferenceVisible(!U);
if (U) {
q2();
return;
}
if (ct3.A(o41.c()) == ScreenDisplayStatus.NORMAL_AND_PORTRAIT || ct3.A(o41.c()) == ScreenDisplayStatus.PAD_AND_PORTRAIT) {
x1().hideLogo();
MapHelper.F2().O7(false);
}
w5(PathPlanStrategyUtil.d(p19.F().U()));
}
public void linkExitNav() {
NavFragment navFragment;
if (!c06.b() || (navFragment = this.A) == null) {
return;
}
navFragment.p1();
}
public void m1(int i2) {
hm4.f("MapUIController", "formatHeightMeasureToolPage");
ve8.p().e(i2);
hideBottomNav();
setLocationImageMarginBottom(ct3.b(o41.b(), i2));
}
public void m2(Activity activity) {
if (this.m0 == null) {
return;
}
a5(false);
ct3.g0(activity);
}
public final void m3(View view) {
n3();
}
public void m4() {
Optional.ofNullable(this.o0).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
a.this.q3((PetalMapsToolbarBinding) obj);
}
});
}
public void m5(boolean z) {
this.d = z;
}
public final void m6() {
new MapAlertDialog.Builder(this.Z).j(R.string.exit_refine_popup_message).v(R.string.quit, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i2) {
a.this.O3(dialogInterface, i2);
}
}).o(R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i2) {
dialogInterface.dismiss();
}
}).F();
}
public void n1(MapScrollLayout.Status status) {
ve8.p().f();
hideBottomNav();
int b2 = ct3.b(o41.b(), 280.0f);
if (status == MapScrollLayout.Status.COLLAPSED) {
setLocationImageMarginBottom(b2);
}
}
public void n2() {
BaseFragment baseFragment;
if (this.l0 == null || (baseFragment = this.E) == null || !(baseFragment instanceof AlongSearchInfoFragment)) {
return;
}
K0();
}
public void n4(final boolean z) {
Optional.ofNullable(this.T).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
((x9) obj).d0(z);
}
});
}
public final void n5(boolean z) {
int i2;
if (this.l0 == null) {
return;
}
if (cq5.a().b()) {
i2 = this.l0.getIsDark() ? R.drawable.hos_navi_complete_bg_dark : R.drawable.hos_navi_complete_achievement_bg;
} else {
int i3 = this.l0.getIsDark() ? R.drawable.hos_navi_complete_bg_dark : R.drawable.hos_navi_complete_bg;
if (z) {
int b2 = eq5.d().b(c06.d());
NaviCompletedBottomSheetFragment naviCompletedBottomSheetFragment = this.M;
if (naviCompletedBottomSheetFragment != null) {
naviCompletedBottomSheetFragment.W(o41.e(b2));
this.M.h0();
}
NaviCompletedNonDriveFragment naviCompletedNonDriveFragment = this.N;
if (naviCompletedNonDriveFragment != null) {
naviCompletedNonDriveFragment.q(o41.e(b2));
this.N.x();
}
}
i2 = i3;
}
cq5.a().g(o41.e(i2), this.l0.getIsDark());
}
public void n6(FragmentActivity fragmentActivity) {
NavController G1;
NewRoadFeedbackViewModel newRoadFeedbackViewModel;
if (fragmentActivity == null || (G1 = G1(fragmentActivity)) == null || (newRoadFeedbackViewModel = this.y) == null) {
return;
}
NavigationRoadFeedbackInfo navigationRoadFeedbackInfo = (NavigationRoadFeedbackInfo) newRoadFeedbackViewModel.v().getValue();
if (navigationRoadFeedbackInfo == null) {
NewRoadFeedBackInfo r = this.y.r();
int i2 = R.id.new_contribution_to_add_new_road;
if (r.getFeedbackType() == NewRoadFeedbackType.MODIFY) {
i2 = R.id.new_contribution_to_modify_road;
} else if (r.getFeedbackType() == NewRoadFeedbackType.DELETE) {
i2 = R.id.new_contribution_to_road_does_not_exist;
} else if (r.getFeedbackType() == NewRoadFeedbackType.SPEED_LIMIT) {
i2 = R.id.new_contribution_to_speed_limit;
}
G1.navigate(i2, this.y.u(r).getBundle());
return;
}
if (navigationRoadFeedbackInfo.getType() == 111) {
SafeBundle safeBundle = new SafeBundle();
safeBundle.putInt("contribution_type", navigationRoadFeedbackInfo.getType());
safeBundle.putString("page_source_key", "1");
G1.navigate(R.id.roadConditionSelectFragment, safeBundle.getBundle());
return;
}
SafeBundle safeBundle2 = new SafeBundle();
safeBundle2.putInt("contribution_type", navigationRoadFeedbackInfo.getType());
G1.navigate(R.id.newContributionSelectFragment, safeBundle2.getBundle());
RouteDataManager.b().I("1");
}
public void o1(MapScrollLayout.Status status) {
ve8.p().g(status);
hideBottomNav();
int b2 = ct3.b(o41.b(), 320.0f);
if (status == MapScrollLayout.Status.COLLAPSED) {
setLocationImageMarginBottom(b2);
}
if (status == MapScrollLayout.Status.EXIT) {
resetLocationBtn();
}
}
public void o2(String str) {
s21.b(this.K, str);
this.J = null;
if (this.l0 == null) {
hm4.h("MapUIController", "mBinding is null.");
return;
}
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding != null) {
petalMapsChildViewBinding.container.setVisibility(8);
this.n0.container.removeAllViews();
}
this.f = false;
showGpReview();
fk2.d(this.g);
}
public final void o3(int i2, View view) {
hm4.p("MapUIController", "MapNavi click index : " + i2);
LayoutAddReminderBinding layoutAddReminderBinding = this.u0;
if (layoutAddReminderBinding == null) {
hm4.h("MapUIController", "initReminderLayout layoutAddReminderBinding is null");
return;
}
if (layoutAddReminderBinding.getIsServiceClose()) {
return;
}
if (this.u0.getIsAdd()) {
jq5.t().L(i2);
hm4.p("MapUIController", "MapNavi removeAttentServerArea");
this.u0.setIsAdd(false);
vz8.B().Z(i2);
return;
}
jq5.t().a(i2);
hm4.p("MapUIController", "MapNavi addAttentServerArea");
dx7.c("2");
this.u0.setIsAdd(true);
vz8.B().k(i2);
}
public final boolean o4() {
return (!p19.F().U0() || c06.b() || p19.F().Q0() || c06.g()) ? false : true;
}
public void o5(final NaviViewModel naviViewModel) {
x2();
Optional.ofNullable(this.T).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
((x9) obj).h0(naviViewModel);
}
});
}
public void o6(FragmentActivity fragmentActivity) {
if (this.l0 == null) {
return;
}
String str = this.F;
if (str != null) {
this.G.push(str);
}
if (k.Z3()) {
this.E = new LanguageFragment();
this.F = LanguageFragment.class.getSimpleName();
} else {
this.E = new LanguageNaviSettingFragment();
this.F = LanguageNaviSettingFragment.class.getSimpleName();
}
SlidingContainerManager.d().D(fragmentActivity, this.E);
}
public void onConfigurationChangedPicPage() {
nx6.a.u();
}
public void openH5ForMeetkaiAd(FragmentActivity fragmentActivity, WebViewData webViewData) {
SafeBundle safeBundle = new SafeBundle();
safeBundle.putString("web_view_arg_url", webViewData.getUrl());
safeBundle.putString("web_view_arg_title", webViewData.getTitle());
safeBundle.putBoolean("web_view_arg_show_refresh_button", false);
safeBundle.putBoolean("web_view_arg_show_icon", false);
try {
BaseFragment<?> g2 = nx6.a.g((PetalMapsActivity) fragmentActivity);
if (g2 != null) {
ux4.e(NavHostFragment.findNavController(g2), R.id.meetkai_to_web_view, safeBundle.getBundle());
}
} catch (IllegalArgumentException unused) {
hm4.h("MapUIController", "does not have a NavController");
}
}
public void p1() {
hm4.f("MapUIController", "fotmatHeightForSelectPage");
ve8.p().h();
hideBottomNav();
setLocationImageMarginBottom(ct3.b(o41.b(), 320.0f));
}
public void p2() {
BaseFragment baseFragment;
if (this.l0 == null || (baseFragment = this.E) == null || !(baseFragment instanceof RoadConditionDetailSelectFragment)) {
return;
}
K0();
}
public final void p3(View view) {
this.r0.scrollPageLayout.S();
}
public void p4(Activity activity) {
if (!c06.b()) {
if (activity instanceof PetalMapsActivity) {
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding == null || petalMapsChildViewBinding.carPageContainer.getVisibility() != 0) {
if (!(nx6.a.g((PetalMapsActivity) activity) instanceof OperationFragment)) {
ct3.g0(activity);
}
} else if (!(((PetalMapsActivity) activity).getSupportFragmentManager().findFragmentById(R.id.car_page_container) instanceof VideoMapFragment)) {
ct3.g0(activity);
}
} else {
ct3.g0(activity);
}
}
ct3.M();
ScreenDisplayStatus A = ct3.A(activity);
HwColumnSystem s = ct3.s();
if (!F2(A, s)) {
hm4.f("MapUIController", "onChangeAdapter false");
return;
}
this.u = A;
this.v = s;
hm4.f("MapUIController", "onChangeAdapter true");
t0(activity);
A0(A, activity);
v0(activity);
s0(A, activity);
B0(A);
C0(A, activity);
u0(A, activity);
E0(ct3.A(activity), activity);
u4();
}
public void p5(MapNaviStaticInfo mapNaviStaticInfo) {
if (this.m0 != null) {
A2(mapNaviStaticInfo);
}
}
public void p6(final FragmentActivity fragmentActivity) {
if (this.l0 == null || c06.b()) {
handleOpacityCoatingViewEnable(false);
return;
}
Optional.ofNullable(this.x).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
a.R3((ActivityViewModel) obj);
}
});
this.P = true;
String str = this.F;
if (str != null) {
this.G.push(str);
}
this.E = new LayerSettingFragment();
PetalMapsActivity petalMapsActivity = (PetalMapsActivity) fragmentActivity;
if (qc6.c(petalMapsActivity)) {
SearchResultFragment g2 = nx6.a.g(petalMapsActivity);
if ((g2 instanceof DetailFragment) || (g2 instanceof BaseHistoryFragment) || (g2 instanceof ExploreHomeFragment)) {
Bundle bundle = new Bundle();
bundle.putBoolean("featured_maps", true);
this.E.setArguments(bundle);
}
if (g2 instanceof SearchResultFragment) {
g2.Y1();
}
}
this.F = LayerSettingFragment.class.getSimpleName();
if (x1().isShowAlongCard()) {
if (ct3.A(o41.c()) == ScreenDisplayStatus.NORMAL_AND_PORTRAIT || ct3.A(o41.c()) == ScreenDisplayStatus.PAD_AND_PORTRAIT) {
MapHelper.F2().O7(false);
}
x1().b2();
}
r5(false);
u5(null, false);
fo7.f().h();
com.huawei.maps.app.common.utils.task.a.f(com.huawei.maps.app.common.utils.task.a.a("MapUIController", "showLayerSettingFragment", new Runnable() {
@Override
public final void run() {
a.this.Q3(fragmentActivity);
}
}), 100L);
}
public boolean q1() {
PetalMapsNavLayoutBinding petalMapsNavLayoutBinding = this.p0;
return petalMapsNavLayoutBinding != null && petalMapsNavLayoutBinding.bottomNav.getVisibility() == 0;
}
public void q2() {
Optional.ofNullable(this.o0).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
((PetalMapsToolbarBinding) obj).setIsRoutePreferenceVisible(false);
}
});
}
public final void q3(PetalMapsToolbarBinding petalMapsToolbarBinding) {
this.o0.petalMapsDescBtn.setVisibility(this.s0 ? 0 : 8);
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding == null) {
return;
}
petalMapsChildViewBinding.bottomLayout.setVisibility(0);
}
public void q4(Activity activity) {
ScreenDisplayStatus A = ct3.A(activity);
w0(A, activity);
A0(A, activity);
v0(activity);
s0(A, activity);
E0(A, activity);
G0(A, activity);
u0(A, activity);
}
public void q5(boolean z) {
this.Y = z;
}
public void q6(int i2, FragmentActivity fragmentActivity) {
MapAlertDialog mapAlertDialog = this.k;
if ((mapAlertDialog != null && mapAlertDialog.v()) || fragmentActivity == null || fragmentActivity.isFinishing() || fragmentActivity.isDestroyed()) {
return;
}
MapAlertDialog.Builder builder = new MapAlertDialog.Builder(fragmentActivity);
int E1 = E1(i2);
if (E1 == 0) {
return;
}
builder.j(E1);
this.k = builder.v(R.string.location_confirm, new d(i2, fragmentActivity)).n(R.string.cancel).F();
}
public void queryTimeCategories(Context context) {
l71.q(context);
}
public void r0(final View.OnClickListener onClickListener) {
if (onClickListener == null) {
return;
}
Optional.ofNullable(this.o0).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
a.a3(onClickListener, (PetalMapsToolbarBinding) obj);
}
});
}
public CustomHwBottomNavigationView r1() {
PetalMapsNavLayoutBinding petalMapsNavLayoutBinding = this.p0;
if (petalMapsNavLayoutBinding == null) {
return null;
}
return petalMapsNavLayoutBinding.bottomNav;
}
public void r2() {
if (this.l0 == null) {
return;
}
a5(true);
b5(false);
handleOpacityCoatingViewEnable(false);
SlidingContainerManager.d().f(this.E);
d1();
this.E = null;
this.F = null;
this.G.clear();
}
public void r4() {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
petalMapsToolbarBinding.trafficSwitch.performClick();
}
public void r5(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.setIsDisplayOffline(z);
this.o0.routeOfflineLayout.q(!z);
}
}
public void r6(FragmentActivity fragmentActivity) {
if (this.n0 == null || fragmentActivity == null) {
return;
}
this.D = new MultiFilterFragment();
this.n0.setShowMultiFilter(true);
this.n0.searchMultiFilterContainer.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
a.this.U3(view);
}
});
FragmentTransaction beginTransaction = fragmentActivity.getSupportFragmentManager().beginTransaction();
beginTransaction.replace(R.id.search_multi_filter_container, this.D);
beginTransaction.commitAllowingStateLoss();
}
public ThemeStyleInfoBean readThemeStyleInfo() {
return nu9.i().q();
}
public void refreshUIPermissionDialog(boolean z) {
LocationPermissionDialogBinding locationPermissionDialogBinding = this.g0;
if (locationPermissionDialogBinding != null) {
locationPermissionDialogBinding.setVariable(n40.a, Boolean.valueOf(z));
this.g0.invalidateAll();
}
MapAlertDialog mapAlertDialog = this.l;
if (mapAlertDialog == null || !mapAlertDialog.v()) {
return;
}
this.l.m();
this.l.H();
}
public void releaseBadBtnListener() {
Optional.ofNullable(this.o0).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
a.u3((PetalMapsToolbarBinding) obj);
}
});
}
public void removeView(View view) {
ViewGroup viewGroup;
if (view == null || (viewGroup = (ViewGroup) view.getParent()) == null) {
return;
}
viewGroup.removeView(view);
}
public void reportOpeEvent(String str) {
np6.n(this.x, str);
}
public void resetLocationBottom() {
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding == null) {
return;
}
int openMarginBottom = homeSlideLayoutBinding.scrollPageLayout.getOpenMarginBottom();
float m = ve8.p().m();
if (m == 1.0f) {
m = 0.0f;
}
setLocationImageMarginBottom((int) (openMarginBottom + ((this.r0.scrollPageLayout.getOpenMarginBottom() - this.r0.scrollPageLayout.getExitMarginBottom()) * m)));
}
public void resetLocationBtn() {
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding == null) {
return;
}
setLocationImageMarginBottom(homeSlideLayoutBinding.scrollPageLayout.getExitOffset());
}
public void resetMapPageLayout() {
c06.m(false);
j5(true);
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.setIsLayerBtnVisible(true);
}
if (TextUtils.isEmpty(ap6.a().b())) {
showBottomNav();
}
x1().a5(true);
PetalMapsToolbarBinding petalMapsToolbarBinding2 = this.o0;
if (petalMapsToolbarBinding2 != null) {
petalMapsToolbarBinding2.setShowNaviCompletedPage(c06.g());
}
if (MapHelper.F2().O2() != null) {
MapHelper.F2().j1(MapHelper.F2().O2());
}
MapHelper.F2().j6();
resetLocationBtn();
ve8.p().l0(MapScrollLayout.ScrollTopBottomState.ENABLE);
ActivityViewModel activityViewModel = this.x;
if (activityViewModel != null) {
activityViewModel.q().postValue("012001");
}
}
public final void s0(ScreenDisplayStatus screenDisplayStatus, Activity activity) {
PetalMapsOtherViewBinding petalMapsOtherViewBinding = this.m0;
if (petalMapsOtherViewBinding == null) {
return;
}
CoordinatorLayout.LayoutParams layoutParams = petalMapsOtherViewBinding.layoutSiteDetailBottom.detailBottomLayout.getLayoutParams();
switch (i.a[screenDisplayStatus.ordinal()]) {
case 1:
case 2:
ct3.p0(this.m0.layoutSiteDetailBottom.detailBottomLayout, ct3.x(activity));
layoutParams.setMarginStart(0);
break;
case 3:
case 4:
case 5:
case 6:
ct3.p0(this.m0.layoutSiteDetailBottom.detailBottomLayout, ct3.L(ct3.s(), false));
layoutParams.setMarginStart(ct3.s().getMargin());
break;
}
this.m0.layoutSiteDetailBottom.detailBottomLayout.setLayoutParams(layoutParams);
}
public PetalMapsChildViewBinding s1() {
return this.n0;
}
public void s2() {
hm4.p("MapUIController", " otherViewBinding hideTransFloatView ");
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding != null) {
petalMapsChildViewBinding.setIsShowTransFloatView(false);
}
}
public final void s3() {
o2("2");
}
public void s4() {
Optional.ofNullable(this.T).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
((x9) obj).e0();
}
});
}
public void s5(int i2) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
petalMapsToolbarBinding.setOfflineTipMargin(i2 - o41.a(o41.c(), 24));
}
public void s6(NavCompleteInfo navCompleteInfo, FragmentActivity fragmentActivity) {
hm4.p("MapUIController", "showNavCommuteDialog");
this.O = new NavCommuteFragment(navCompleteInfo);
FragmentManager supportFragmentManager = fragmentActivity.getSupportFragmentManager();
if (supportFragmentManager.isDestroyed()) {
return;
}
FragmentTransaction beginTransaction = supportFragmentManager.beginTransaction();
beginTransaction.replace(R.id.commute_dialog_container, this.O);
beginTransaction.commitAllowingStateLoss();
}
public void scrollLocationButton(float f2) {
if (this.r0 == null) {
return;
}
if (f2 == 1.0f) {
f2 = 0.0f;
}
if (f2 > 0.0f) {
return;
}
setLocationImageMarginBottom((int) (r0.scrollPageLayout.getOpenMarginBottom() + ((this.r0.scrollPageLayout.getOpenMarginBottom() - this.r0.scrollPageLayout.getExitMarginBottom()) * f2)));
}
public void scrollWeatherBadge(float f2) {
if (this.r0 == null) {
return;
}
if (f2 == 1.0f) {
f2 = 0.0f;
}
if (f2 > 0.0f) {
return;
}
setWeatherBadgeMarginBottom((int) (r0.scrollPageLayout.getOpenMarginBottom() + ((this.r0.scrollPageLayout.getOpenMarginBottom() - this.r0.scrollPageLayout.getExitMarginBottom()) * f2)));
}
public void scrollWeatherDisplayExtraMarginBottom(float f2) {
if (this.r0 == null) {
return;
}
if (f2 == 1.0f) {
f2 = 0.0f;
}
if (f2 > 0.0f) {
return;
}
setWeatherDisplayExtraMarginBottom((int) (r0.scrollPageLayout.getOpenMarginBottom() + ((this.r0.scrollPageLayout.getOpenMarginBottom() - this.r0.scrollPageLayout.getExitMarginBottom()) * f2)));
}
public void setAlongSearchTrafficEvent(final boolean z) {
Optional.ofNullable(this.T).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
((x9) obj).f0(z);
}
});
}
public void setBadResultCallbackFromDetail(Context context, final String str, final Function0<mda> function0) {
if (br8.L()) {
br8.N(context);
br8.Z(true);
View N1 = N1();
if (N1 != null) {
br8.S(N1);
N1.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
a.x3(function0, str, view);
}
});
}
}
}
public void setDetailEndHeight(int i2, int i3) {
hm4.f("MapUIController", "setDetailEndHeight");
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding == null) {
return;
}
homeSlideLayoutBinding.scrollPageLayout.setEnable(true);
this.r0.scrollPageLayout.setMaxOffset(i2);
this.r0.scrollPageLayout.setExitOffset(i3);
hideBottomNav();
}
public void setDetailStartHeight(int i2) {
hm4.f("MapUIController", "setDetailStartHeight");
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding == null) {
return;
}
homeSlideLayoutBinding.scrollPageLayout.setExitOffset(i2);
this.r0.scrollPageLayout.Y();
this.r0.scrollPageLayout.setEnable(false);
this.r0.scrollPageLayout.setDraggable(true);
hideBottomNav();
setLocationImageMarginBottom(i2);
}
public void setDisableExpendForNavi(boolean z) {
this.w0 = z;
}
public void setDynamicCardCallBack(DynamicCardCallBack dynamicCardCallBack) {
this.H = dynamicCardCallBack;
}
public void setFromLayer(Boolean bool) {
this.j0 = bool.booleanValue();
}
public void setIsCheckPoiOffline(boolean z) {
this.c0 = z;
}
public void setIsExposureForPDC(boolean z) {
this.S = z;
}
public void setIsExposureForPRC(boolean z) {
this.R = z;
}
public void setIsNavinfoLogoVisible() {
fk2.b(new b());
}
public void setIsNavinfoLogoVisibleSync(boolean z) {
if (!fk2.a()) {
setIsNavinfoLogoVisible();
} else {
this.o0.setIsNavinfoLogoVisible(z);
x0();
}
}
public void setIsPetalLogoVisible(boolean z) {
fk2.b(new RunnableC0006a(z));
}
public void setIsPrivacyBtnVisible(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
petalMapsToolbarBinding.setIsPrivacyBtnVisible(z);
}
public void setIsReportWithRollbackSRP(boolean z) {
this.V = z;
}
public void setIsShowOfflineTips(final boolean z) {
Optional.ofNullable(this.o0).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
((PetalMapsToolbarBinding) obj).setIsShowOfflineTips(z);
}
});
}
public void setLastCameraBounds(LatLngBounds latLngBounds) {
this.X = latLngBounds;
}
public void setLastCameraPosition(CameraPosition cameraPosition) {
this.W = cameraPosition;
this.X = null;
}
public void setLocationBtnImage(MapLocationStatus mapLocationStatus) {
this.j = mapLocationStatus;
S6(mapLocationStatus);
}
public void setLocationImageMarginBottom(int i2) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
if (petalMapsToolbarBinding.getIsDisplayOffline() && c06.c()) {
int height = this.o0.routeOfflineLayout.getHeight();
if (height == 0) {
this.o0.routeOfflineLayout.measure(0, 0);
height = this.o0.routeOfflineLayout.getMeasuredHeight();
}
i2 = (height + i2) - o41.a(o41.c(), 30);
}
if (this.o0.getShowRestrictedRouteTips()) {
i2 = i2 + this.o0.restrictedTipsItem.tipsLayout.getHeight() + o41.a(o41.c(), 12);
}
ScreenDisplayStatus A = ct3.A(o41.b());
int dimension = (int) o41.c().getResources().getDimension(R.dimen.dp_8);
if (!isShowAlongSearchInfoFragment()) {
MapButton mapButton = this.o0.petalMapsRoutePreference;
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) mapButton.getLayoutParams();
layoutParams.bottomMargin = i2 + dimension + o41.a(o41.c(), 4);
mapButton.setLayoutParams(layoutParams);
}
if (A == ScreenDisplayStatus.PAD_AND_LANDSCAPE || A == ScreenDisplayStatus.MATAX_AND_TAHITI_AND_LANDSCAPE || A == ScreenDisplayStatus.MATAX_AND_TAHITI_AND_PORTRAIT) {
return;
}
RelativeLayout relativeLayout = this.o0.petalMapsEndBtnList;
FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) relativeLayout.getLayoutParams();
int i3 = i2 + dimension;
layoutParams2.bottomMargin = i3;
hm4.f("MapUIController", "adapterDriveRoutePageHeight MapUIController, (marginBottom + dimensionValue): " + i3);
relativeLayout.setLayoutParams(layoutParams2);
}
public void setMapViewResultHeight(int i2) {
this.L = i2;
}
public void setScrollBounds(View view) {
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding != null) {
homeSlideLayoutBinding.scrollPageLayout.setSlideBounds(view);
}
}
public void setShowSiteDetailBottom(boolean z) {
PetalMapsOtherViewBinding petalMapsOtherViewBinding = this.m0;
if (petalMapsOtherViewBinding != null) {
petalMapsOtherViewBinding.setIsShowSiteDetail(z);
}
}
public void setThemeStyleInfo(String str) {
nu9.i().t(str);
}
public void setWeatherBadgeMarginBottom(int i2) {
M5(i2);
if (this.o0 == null || isShowAlongSearchInfoFragment()) {
return;
}
ScreenDisplayStatus A = ct3.A(o41.b());
if (A == ScreenDisplayStatus.PAD_AND_LANDSCAPE || A == ScreenDisplayStatus.MATAX_AND_TAHITI_AND_LANDSCAPE || A == ScreenDisplayStatus.MATAX_AND_TAHITI_AND_PORTRAIT) {
x0();
return;
}
int dimension = (int) o41.c().getResources().getDimension(R.dimen.dp_7);
RelativeLayout relativeLayout = this.o0.weatherBadgeAndLogo;
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) relativeLayout.getLayoutParams();
int i3 = layoutParams.bottomMargin;
boolean z = true;
boolean z2 = !SlidingContainerManager.d().k() || SlidingContainerManager.d().l() || SlidingContainerManager.d().i();
if (!this.o0.getIsRoutePreferenceVisible() && !this.o0.getIsDisplayOffline()) {
z = false;
}
if (z2 && z && s68.a().d()) {
layoutParams.bottomMargin = i2 + dimension + o41.a(o41.c(), 4) + (this.o0.getIsRoutePreferenceVisible() ? this.o0.petalMapsRoutePreference.getHeight() : 0);
if (this.o0.getIsDisplayOffline()) {
int height = this.o0.routeOfflineLayout.getHeight();
if (height == 0) {
this.o0.routeOfflineLayout.measure(0, 0);
height = this.o0.routeOfflineLayout.getMeasuredHeight();
}
layoutParams.bottomMargin = (layoutParams.bottomMargin + height) - o41.a(o41.c(), 30);
}
if (this.o0.getShowRestrictedRouteTips()) {
layoutParams.bottomMargin = layoutParams.bottomMargin + this.o0.restrictedTipsItem.tipsLayout.getHeight() + o41.a(o41.c(), 12);
}
} else {
layoutParams.bottomMargin = i2 + dimension;
}
hm4.f("MapUIController", "setWeatherBadgeBottom, value is (marginBottom + dimensionValue): " + (i2 + dimension));
if (i3 == layoutParams.bottomMargin) {
return;
}
relativeLayout.setLayoutParams(layoutParams);
x0();
}
public void setWeatherDisplayExtraMarginBottom(int i2) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
LottieAnimationView lottieAnimationView = petalMapsToolbarBinding.weatherDisplayExtra;
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) lottieAnimationView.getLayoutParams();
layoutParams.bottomMargin = i2;
lottieAnimationView.setLayoutParams(layoutParams);
}
public void showAddressAskingFragment(FragmentActivity fragmentActivity, Site site) {
if (site != null) {
AddressAskingDialogFragment addressAskingDialogFragment = new AddressAskingDialogFragment(site);
addressAskingDialogFragment.show(fragmentActivity.getSupportFragmentManager(), addressAskingDialogFragment.getTag());
}
}
public void showBottomNav() {
if (this.p0 == null || c06.b() || c06.g()) {
return;
}
if (!this.p0.getShowBottomNav() && !ve8.p().B()) {
this.p0.setShowBottomNav(true);
}
AbstractMapUIController.getInstance().setIsShowOfflineTips(false);
V5(false);
}
public void showCardPage() {
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding != null) {
petalMapsChildViewBinding.carPageContainer.setVisibility(0);
}
}
public void showConditionQuantityTips(final int i2) {
if (P2(i2)) {
if (ct3.A(o41.c()) != ScreenDisplayStatus.PAD_AND_LANDSCAPE && !ct3.R()) {
C2();
Runnable runnable = new Runnable() {
@Override
public final void run() {
a.this.N3(i2);
}
};
this.f0 = runnable;
fk2.c(runnable, 1000L);
return;
}
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
hm4.p("MapUIController", "toolbarBinding is null");
return;
}
petalMapsToolbarBinding.gnssViewPad.setVisibility(0);
Runnable runnable2 = new Runnable() {
@Override
public final void run() {
a.this.L3(i2);
}
};
this.f0 = runnable2;
fk2.c(runnable2, 1000L);
}
}
public void showCustomShareFragment(FragmentManager fragmentManager, String str, String str2, String str3, int i2) {
showCustomShareFragment(fragmentManager, str, str2, str3, RoadReportType.CAMERA_INCORRECT, i2);
}
public void showCustomShareFragmentForBadge(FragmentManager fragmentManager, int i2, SaveBadgeShareDialogListener saveBadgeShareDialogListener) {
if (fragmentManager == null) {
return;
}
ShareBottomSheetFragment shareBottomSheetFragment = new ShareBottomSheetFragment("url", RoadReportType.CAMERA_INCORRECT, RoadReportType.CAMERA_INCORRECT, i2, true, "image/*", saveBadgeShareDialogListener);
this.n = shareBottomSheetFragment;
shareBottomSheetFragment.show(fragmentManager, "dialog");
}
public void showGpReview() {
if (nf3.a() && (o41.b().getMapAppLifeCycle().getTopActivity() instanceof PetalMapsActivity)) {
nf3.b(o41.b().getMapAppLifeCycle().getTopActivity());
}
}
public void showLocationAlertDialog(final int i2, final Context context) {
String string;
String string2;
if (context != null) {
boolean z = context instanceof Activity;
if (z) {
Activity activity = (Activity) context;
if (activity.isFinishing() || activity.isDestroyed()) {
return;
}
}
MapAlertDialog mapAlertDialog = this.l;
if (mapAlertDialog == null || !mapAlertDialog.v()) {
View inflate = View.inflate(o41.c(), R.layout.location_permission_dialog, null);
LocationPermissionDialogBinding locationPermissionDialogBinding = (LocationPermissionDialogBinding) DataBindingUtil.bind(inflate);
this.g0 = locationPermissionDialogBinding;
if (locationPermissionDialogBinding == null) {
return;
}
boolean d2 = o9a.d();
final int i3 = 111;
if (i2 == 0) {
string = context.getString(R.string.location_info_service);
string2 = context.getString(R.string.permission_usage_description_content_location);
} else if (i2 == 2) {
string = context.getString(R.string.permission_enable_required_title_microphone);
string2 = context.getString(R.string.permission_usage_description_content_microphone);
i3 = 113;
} else if (i2 == 3) {
string = context.getString(R.string.permission_enable_required_title_storage);
string2 = context.getString(R.string.feedback_sdk_setting_dialog_content);
i3 = 112;
} else if (i2 == 4) {
string = context.getString(R.string.permission_enable_required_title_camera);
string2 = context.getString(R.string.permission_usage_description_content_camera);
i3 = 114;
} else if (i2 != 5) {
string = context.getString(R.string.permission_enable_required_title_location);
string2 = context.getString(R.string.permission_usage_description_content_location);
} else {
string = context.getString(R.string.permission_enable_required_title_notifications);
string2 = context.getString(R.string.permission_usage_description_content_notifications);
i3 = 115;
}
this.g0.tvDialogContent.setText(string);
this.g0.tvDialogDesc.setText(string2);
this.g0.setVariable(n40.a, Boolean.valueOf(d2));
this.g0.confirmLocationTextView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
a.this.S3(i2, context, i3, view);
}
});
this.g0.cancelLocationTextView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
a.this.T3(view);
}
});
if (z) {
Activity activity2 = (Activity) context;
if (activity2.isFinishing() || activity2.isDestroyed()) {
return;
}
}
MapAlertDialog.Builder builder = new MapAlertDialog.Builder(context);
builder.D(inflate);
this.l = builder.c();
this.l = builder.F();
}
}
}
public void showLogo(boolean z) {
int i2 = (s68.a().d() || this.L != 0) ? 100 : 0;
MapHelper.F2().O7(false);
new Handler().postDelayed(new f(z), i2);
}
public void showPoiOfflineDialog(DialogInterface.OnClickListener onClickListener) {
this.b0 = onClickListener;
Activity activity = this.Z;
if (activity == null) {
hm4.h("MapUIController", "showPoiOfflineDialog activity is null");
} else {
this.a0 = new MapAlertDialog.Builder(activity).j(com.huawei.maps.poi.R.string.poi_offline_tip).v(com.huawei.maps.poi.R.string.delete, this.b0).n(com.huawei.maps.poi.R.string.cancel).h(new AlertDialogRunnable() {
public final void run(AlertDialog alertDialog) {
a.V3(alertDialog);
}
}).F();
}
}
public void showPoiPicturesPage(Activity activity, ArrayList<String> arrayList, List<String> list, int i2, BaseFragment baseFragment, String str, boolean z) {
if (activity instanceof PetalMapsActivity) {
nx6.a.I(arrayList, list, i2, baseFragment, str, z);
}
}
public void showResultBadButton() {
if (k0a.k().m()) {
return;
}
Optional.ofNullable(this.o0).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
a.this.Y3((PetalMapsToolbarBinding) obj);
}
});
}
public void showRewardView(AchievementInfo achievementInfo) {
int i2;
int i3;
if (this.n0 == null || achievementInfo == null || achievementInfo.getType() == 6) {
hm4.h("MapUIController", "mBinding is null.");
return;
}
this.n0.container.removeAllViews();
this.J = DialogRewardBinding.inflate(LayoutInflater.from(o41.c()));
this.K = achievementInfo.getResultType();
int type = achievementInfo.getType();
hm4.p("MapUIController", "showRewardView type:" + type);
if (type == 1) {
i2 = R.plurals.map_achievement_mileage_kilometers;
i3 = R.drawable.map_achievement_km;
n5.e();
} else if (type == 2) {
i2 = R.plurals.map_achievement_mileage_miles;
i3 = R.drawable.map_achievement_km;
n5.f();
} else if (type == 3) {
i2 = R.plurals.achievement_navigation;
i3 = R.drawable.map_achievement_time;
n5.h();
} else if (type == 4) {
i2 = R.plurals.achievement_collection;
i3 = R.drawable.map_achievement_fav;
n5.g();
} else if (type != 5) {
i2 = 0;
i3 = 0;
} else {
i2 = R.plurals.map_achievement_usage_days;
i3 = R.drawable.map_achievement_days;
n5.i();
}
this.J.dialogRewardImageview.setImageResource(i3);
this.J.dialogRewardMessage.setText(o41.c().getResources().getQuantityString(i2, (int) achievementInfo.getThreshold(), Integer.valueOf((int) achievementInfo.getThreshold())));
this.J.setIsDark(o9a.f());
if (ct3.A(o41.c()) == ScreenDisplayStatus.PAD_AND_LANDSCAPE || ct3.R()) {
ct3.p0(this.J.relativeLayout, ct3.H(ct3.s()));
}
View root = this.J.getRoot();
this.J.dialogRewardClose.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
a.this.Z3(view);
}
});
this.f = true;
this.n0.container.setVisibility(0);
this.n0.container.addView(root);
fk2.c(this.g, ExploreViewModel.DELAY_TIME_MILLIS);
}
public void showShareDialog(Activity activity, String str, int i2) {
if (activity == null || TextUtils.isEmpty(str)) {
return;
}
com.huawei.maps.poi.utils.b.n(str, activity, i2);
}
public void showWeatherBadge() {
if (this.l0 == null || this.o0 == null || this.m0 == null || c06.g() || !txa.m() || c06.b() || this.m0.getInCruiseNav()) {
return;
}
if (MapHelper.F2().n2() != null && Double.isNaN(MapHelper.F2().n2().target.latitude)) {
hideWeatherBadge();
return;
}
if (!txa.p() || this.P || this.Q) {
return;
}
if (tg6.b().c().isOffLineSwitchOn() && !qk9.r()) {
hm4.p("MapUIController", "in offline,weather icon is forbidden");
} else if (k0a.k().m()) {
hm4.p("MapUIController", "in incognito mode, weather icon is forbidden");
} else {
this.o0.weatherBadge.b();
}
}
public void startNavigation(Activity activity, Site site, boolean z) {
if (activity == 0) {
return;
}
NaviCurRecord.getInstance().updateNaviCurInfo(site);
if (!(activity instanceof PetalMapsActivity)) {
hm4.h("MapUIController", "getActivity() return null");
} else {
hr8.a((PetalMapsActivity) activity);
jh8.Y(z);
}
}
public void startNavigationDrive(Activity activity, Site site) {
if (activity == 0) {
return;
}
NaviCurRecord.getInstance().updateNaviCurInfo(site);
if (!(activity instanceof PetalMapsActivity)) {
hm4.h("MapUIController", "getActivity() return null");
return;
}
p79.g("poi_to_nav", true, o41.c());
hr8.a((PetalMapsActivity) activity);
jh8.X(true);
}
public void startNavigationSearch(Activity activity) {
if (activity == null) {
return;
}
if (!(activity instanceof PetalMapsActivity)) {
hm4.h("MapUIController", "getActivity() return null");
return;
}
try {
Navigation.findNavController(activity, R.id.fragment_list).navigate(R.id.nav_search_home_page);
} catch (IllegalArgumentException unused) {
hm4.h("MapUIController", "navGraphId is unknown to this NavController");
} catch (IllegalStateException unused2) {
hm4.h("MapUIController", "does not have a NavController");
}
}
public void startNavigationTeamDrive(Activity activity, Site site) {
if (activity == 0) {
return;
}
NaviCurRecord.getInstance().updateNaviCurInfo(site);
if (!(activity instanceof PetalMapsActivity)) {
hm4.h("MapUIController", "getActivity() return null");
return;
}
p79.g("poi_to_nav", true, o41.c());
TeamMapUtils.t(Boolean.TRUE);
hr8.a((PetalMapsActivity) activity);
jh8.X(true);
}
public void startServicePermission(String str) {
if (ServicePermission.isCloudControlSuccess()) {
return;
}
com.huawei.maps.startup.permission.a.a.C((Activity) null, str);
}
public void startWirelessSetting(Activity activity, OnSettingsWirelessBackListener onSettingsWirelessBackListener) {
if (activity instanceof PetalMapsActivity) {
ow6 ow6Var = ow6.a;
sr4.f((PetalMapsActivity) activity, 100);
nx6.a.D(onSettingsWirelessBackListener);
}
}
public final void t0(Context context) {
ScreenDisplayStatus A = ct3.A(context);
if (A == ScreenDisplayStatus.PAD_AND_LANDSCAPE || A == ScreenDisplayStatus.MATAX_AND_TAHITI_AND_LANDSCAPE || A == ScreenDisplayStatus.MATAX_AND_TAHITI_AND_PORTRAIT) {
w0(A, context);
}
E0(A, context);
G0(A, context);
}
public final int t1(int i2) {
return ct3.f0(o41.c(), i2);
}
public void t2() {
hm4.p("MapUIController", " otherViewBinding hideTransNaviSettingView ");
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding != null) {
petalMapsChildViewBinding.setIsShowTransNaviView(false);
}
}
public void t4(int i2) {
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding != null) {
homeSlideLayoutBinding.scrollPageLayout.L(i2);
}
}
public void t5(int i2) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
petalMapsToolbarBinding.setRestrictedRouteTipsMargin(i2 + o41.a(o41.c(), 12));
}
public void t6(NavCompleteInfo navCompleteInfo, FragmentActivity fragmentActivity, Site site) {
if (this.l0 == null || navCompleteInfo == null || this.n0 == null || this.o0 == null) {
hm4.h("MapUIController", "binding is null");
return;
}
if (k06.r() && this.M == null) {
hm4.h("MapUIController", "null fragment for drive");
return;
}
if (k06.x() && this.N == null) {
hm4.h("MapUIController", "null fragment for ride or walk");
return;
}
hm4.p("MapUIController", "show completed page");
this.U = true;
AchievementInfo achievementInfo = navCompleteInfo.getAchievementInfo();
int d2 = c06.d();
b6(achievementInfo, d2);
cq5.a().f(d2);
if (d2 == 0) {
this.n0.setShowNaviCompletedPage(true);
this.M.a0(d2);
SlidingContainerManager.d().D(fragmentActivity, this.M);
this.n0.naviCompletedButtonsRoot.setVisibility(0);
SlidingContainerManager.d().B(false);
} else {
this.n0.setShowNaviCompletedPage(true);
this.n0.setShowNonDriveCompletePage(true);
this.N.t(d2);
SlidingContainerManager.d().E(fragmentActivity, this.N);
this.n0.naviCompletedContainer.setVisibility(0);
SlidingContainerManager.d().B(false);
}
if (navCompleteInfo.getCommuteType() != 0) {
s6(navCompleteInfo, fragmentActivity);
}
setLocationImageMarginBottom(ct3.b(o41.c(), 396.0f));
j5(false);
MapHelper.F2().q6(Boolean.FALSE);
AchievementInfo achievementInfo2 = this.I;
pn5.N(achievementInfo2 != null ? achievementInfo2.getResultType() : null, String.valueOf(navCompleteInfo.getCommuteType()));
if (x1().isShowAlongCard()) {
x1().c2();
}
this.o0.setIsLayerBtnVisible(false);
MapHelper.F2().Y7(site);
MapHelper.F2().D6((!NaviCurRecord.getInstance().isToPoiSite() || (NaviCurRecord.getInstance().isToPoiSite() && (site.isNewPoiType() || AbstractMapUIController.getInstance().isPoiTypeOnlySupportUgcAdd(site)))) ? R.string.add_location : R.string.inaccurate_endpoint);
MapHelper.F2().Z6(!k0a.k().m());
k4(d2);
}
public void themeRequestInit() {
nu9.i().v();
}
public void toggleBadResultBubble(final boolean z) {
if (k0a.k().m()) {
return;
}
Optional.ofNullable(this.o0).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
a.this.j4(z, (PetalMapsToolbarBinding) obj);
}
});
}
public void transportDetailFeedbackBubbleShown(boolean z) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
if (!z) {
petalMapsToolbarBinding.setIsFeedbackBubbleVisible(false);
} else {
petalMapsToolbarBinding.setIsFeedbackBubbleVisible(true);
this.o0.badResultTips.setText(R.string.not_best_bubble_reminder);
}
}
}
public void transportDetailFeedbackIcon() {
PetalMapsToolbarBinding petalMapsToolbarBinding;
if (k0a.k().m() || (petalMapsToolbarBinding = this.o0) == null) {
return;
}
petalMapsToolbarBinding.setIsLayerBtnVisible(true);
this.o0.setIsResultBadVisible(true);
}
public void u0(ScreenDisplayStatus screenDisplayStatus, Activity activity) {
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding == null) {
}
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) petalMapsChildViewBinding.fragmentContainer.fragmentContainerInDriveNav.getLayoutParams();
switch (i.a[screenDisplayStatus.ordinal()]) {
case 1:
case 2:
ct3.p0(this.n0.fragmentContainer.fragmentContainerInDriveNav, ct3.x(activity));
layoutParams.setMarginStart(0);
this.n0.fragmentContainer.fragmentContainerInDriveNav.setLayoutParams(layoutParams);
break;
case 3:
case 4:
case 5:
case 6:
ct3.p0(this.n0.fragmentContainer.fragmentContainerInDriveNav, ct3.L(ct3.s(), false));
layoutParams.setMarginStart(ct3.s().getMargin());
this.n0.fragmentContainer.fragmentContainerInDriveNav.setLayoutParams(layoutParams);
break;
}
}
public boolean u1() {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
return petalMapsToolbarBinding.getIsFullViewRoute();
}
return false;
}
public void u2() {
PetalMapsOtherViewBinding petalMapsOtherViewBinding = this.m0;
if (petalMapsOtherViewBinding != null) {
petalMapsOtherViewBinding.setIsShowTeamMapBottom(false);
}
}
public void u4() {
FrameLayout.LayoutParams layoutParams;
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null || !petalMapsToolbarBinding.getShowRestrictedRouteTips() || (layoutParams = (FrameLayout.LayoutParams) this.o0.restrictedTipsItem.tipsLayout.getLayoutParams()) == null) {
return;
}
int b2 = ct3.b(o41.b(), 16.0f);
if (ct3.b0()) {
layoutParams.width = -1;
layoutParams.setMarginEnd(ct3.b(o41.b(), 16.0f));
} else {
b2 = ct3.s().getMargin();
layoutParams.width = ct3.L(ct3.s(), false);
}
layoutParams.setMarginStart(b2);
this.o0.restrictedTipsItem.tipsLayout.setLayoutParams(layoutParams);
}
public void u5(RouteEventBean routeEventBean, boolean z) {
boolean z2 = routeEventBean != null;
if (this.o0 == null) {
return;
}
if (s68.a().d() || !z2) {
if (x1().T2() && z2) {
return;
}
if (x1().isShowAlongSearchInfoFragment() && z2) {
return;
}
if (x1().L2() && z2) {
return;
}
if (TextUtils.equals(this.F, PlanStrategyFragment.class.getSimpleName()) && z2) {
return;
}
this.o0.setShowRestrictedRouteTips(z2);
if (z2 && routeEventBean.getEventText() != null) {
this.o0.restrictedTipsItem.tvRouteTips.setText(routeEventBean.getEventText());
}
u4();
if (isSearchInExploreImpl()) {
return;
}
if (z2) {
this.o0.restrictedTipsItem.tipsLayout.post(new h());
} else if (z) {
F0();
setLocationImageMarginBottom(this.o0.getRestrictedRouteTipsMargin() - o41.a(o41.c(), 12));
}
}
}
public void u6(FragmentActivity fragmentActivity) {
if (this.l0 == null) {
return;
}
String str = this.F;
if (str != null) {
this.G.push(str);
}
this.E = new PlanStrategyFragment();
fo7.f().h();
u5(null, false);
this.F = PlanStrategyFragment.class.getSimpleName();
SlidingContainerManager.d().s(true);
SlidingContainerManager.d().D(fragmentActivity, this.E);
}
public void unbindScrollView() {
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding != null) {
homeSlideLayoutBinding.scrollPageLayout.b0();
}
}
public void v0(Activity activity) {
PetalMapsNavLayoutBinding d2 = b55.c().d();
if (d2 == null || activity == null) {
return;
}
ScreenDisplayStatus A = ct3.A(activity);
CoordinatorLayout.LayoutParams layoutParams = d2.navLayout.getLayoutParams();
switch (i.a[A.ordinal()]) {
case 1:
case 2:
ct3.p0(d2.bottomNav, ct3.x(activity));
ct3.p0(d2.navLayout, ct3.x(activity));
layoutParams.setMarginStart(0);
break;
case 3:
case 4:
case 5:
case 6:
int L = ct3.L(ct3.s(), false);
ct3.p0(d2.bottomNav, L);
ct3.p0(d2.navLayout, L);
layoutParams.setMarginStart(ct3.s().getMargin());
break;
}
d2.navLayout.setLayoutParams(layoutParams);
}
public boolean v1() {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
return petalMapsToolbarBinding.getIsShowFullViewButton();
}
return false;
}
public void v2(PetalMapsActivity petalMapsActivity, HomeSlideLayoutBinding homeSlideLayoutBinding, MapScrollLayout.OnScrollChangedListener onScrollChangedListener) {
if (homeSlideLayoutBinding != null) {
hm4.p("MapUIController", "MAP LAUNCH initScrollLayout start");
x1().K5(homeSlideLayoutBinding);
D2(petalMapsActivity);
homeSlideLayoutBinding.scrollPageLayout.setOnScrollChangedListener(onScrollChangedListener);
petalMapsActivity.getSupportFragmentManager().beginTransaction().add(R.id.fragment_list, NavHostFragment.create(R.navigation.nav_petalmaps)).commitAllowingStateLoss();
petalMapsActivity.setNavigation(IPatelMapsView.NavigationItem.EXPLORE);
homeSlideLayoutBinding.scrollPageLayout.setOnTouchListener(new View.OnTouchListener() {
@Override
public final boolean onTouch(View view, MotionEvent motionEvent) {
boolean i3;
i3 = a.i3(view, motionEvent);
return i3;
}
});
S0(((BaseActivity) petalMapsActivity).isDark);
MapTipsShowHelperV2.INSTANCE.getInstance().setSlideBinding(homeSlideLayoutBinding);
hm4.p("MapUIController", "MAP LAUNCH initScrollLayout end");
}
}
public void v4() {
ActivityPetalMapsBinding activityPetalMapsBinding = this.l0;
if (activityPetalMapsBinding != null) {
activityPetalMapsBinding.getRoot().dispatchConfigurationChanged(this.l0.getRoot().getResources().getConfiguration());
}
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding != null) {
homeSlideLayoutBinding.setIsDark(o9a.d());
}
refreshUIPermissionDialog(o9a.d());
xu0.i().n();
UGCRealTimeDisplayViewModel uGCRealTimeDisplayViewModel = this.z;
if (uGCRealTimeDisplayViewModel != null) {
uGCRealTimeDisplayViewModel.m();
}
}
public void v5(boolean z, boolean z2) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
if (z2 && z) {
w5(String.format(Locale.ROOT, o41.c().getString(R.string.navi_route_preference_placeholder), o41.c().getString(R.string.navi_avoid_charges), o41.c().getString(R.string.navi_avoid_ferry)));
return;
}
if (z) {
w5(o41.c().getString(R.string.navi_avoid_charges));
} else if (z2) {
w5(o41.c().getString(R.string.navi_avoid_ferry));
} else {
petalMapsToolbarBinding.setIsRoutePreferenceVisible(false);
}
}
public void v6(final PetalMapsActivity petalMapsActivity) {
SensorManager sensorManager = (SensorManager) o41.c().getSystemService("sensor");
if (sensorManager == null) {
cz9.k(o41.f(R.string.qibla_no_permission_tip));
return;
}
Sensor defaultSensor = sensorManager.getDefaultSensor(2);
Sensor defaultSensor2 = sensorManager.getDefaultSensor(1);
if (defaultSensor == null || defaultSensor2 == null) {
cz9.k(o41.f(R.string.qibla_no_permission_tip));
return;
}
if (ml4.d(petalMapsActivity)) {
this.c = 0;
}
ml4.h(petalMapsActivity, new SimpleListener() {
public final void then() {
a.this.X3(petalMapsActivity);
}
});
}
public final void w0(ScreenDisplayStatus screenDisplayStatus, Context context) {
if (this.o0 == null) {
return;
}
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(this.o0.petalMapsEndBtnList.getLayoutParams());
switch (i.a[screenDisplayStatus.ordinal()]) {
case 1:
case 2:
case 3:
layoutParams.gravity = 8388693;
layoutParams.setMargins(0, 0, 0, ct3.b(context, 144.0f));
layoutParams.setMarginEnd(ct3.b(context, 12.0f));
break;
case 4:
case 5:
case 6:
layoutParams.gravity = 8388693;
layoutParams.setMargins(0, 0, 0, ct3.b(context, 12.0f));
layoutParams.setMarginEnd(ct3.b(context, 12.0f));
break;
}
hm4.p("MapUIController", "adjustPetalMapsLocation MapUIController: " + layoutParams.bottomMargin);
this.o0.petalMapsEndBtnList.setLayoutParams(layoutParams);
}
public boolean w1() {
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
return petalMapsChildViewBinding != null && petalMapsChildViewBinding.getInCOVIDFragment();
}
public void w2(BaseActivity baseActivity, ActivityPetalMapsBinding activityPetalMapsBinding) {
this.l0 = activityPetalMapsBinding;
this.m0 = b55.c().f();
this.n0 = b55.c().b();
this.o0 = b55.c().h();
this.p0 = b55.c().d();
this.q0 = b55.c().g();
this.w = baseActivity.getActivityViewModel(BottomViewModel.class);
this.x = (ActivityViewModel) baseActivity.getActivityViewModel(ActivityViewModel.class);
this.y = (NewRoadFeedbackViewModel) baseActivity.getActivityViewModel(NewRoadFeedbackViewModel.class);
this.z = baseActivity.getActivityViewModel(UGCRealTimeDisplayViewModel.class);
this.q = baseActivity.getActivityViewModel(TeamMapBottomViewModel.class);
a5(true);
b5(false);
V5(false);
this.t0 = ct3.b(o41.b(), 8.0f);
if (this.n0 != null) {
SlidingContainerManager.d().g(this.n0.slidingContainerScrollLayout);
if (activityPetalMapsBinding != null) {
SlidingContainerManager.d().h(activityPetalMapsBinding.petalMaps.getHeight());
}
}
this.Z = baseActivity;
fk2.c(new Runnable() {
@Override
public final void run() {
a.this.x2();
}
}, 500L);
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.setIsShareWithMeBtnRedVisible(false);
}
E5(false);
P4(false, false);
x1().O0(l36.u());
}
public void w4() {
if (this.n0 == null) {
return;
}
if (ct3.W(o41.c())) {
this.n0.bottomLayout.setOnSimulatedNavListener(null);
} else {
this.n0.bottomLayout.setPhoneOnSimulatedNavListener(null);
}
}
public final void w5(String str) {
if (this.n0 == null || this.o0 == null) {
return;
}
if (ct3.W(o41.c())) {
this.o0.setIsRoutePreferenceVisible(false);
this.n0.bottomLayout.setRoutePreference(str);
} else {
this.o0.setIsRoutePreferenceVisible(true);
this.o0.setRoutePreference(str);
}
F0();
if (this.n0.getInNav()) {
return;
}
gn4.i().u();
}
public void w6(FragmentActivity fragmentActivity, String str, String str2) {
if (this.l0 == null) {
return;
}
String str3 = this.F;
if (str3 != null) {
this.G.push(str3);
}
fo7.f().h();
u5(null, false);
this.E = RoadConditionDetailSelectFragment.m.a(str, str2);
this.F = RoadConditionDetailSelectFragment.class.getSimpleName();
SlidingContainerManager.d().D(fragmentActivity, this.E);
}
public void x0() {
if (gn4.i().l()) {
y0();
} else {
z0();
}
}
public final void x2() {
if (this.l0 == null || this.Z == null || this.T != null) {
return;
}
x9 x9Var = new x9(this.l0, this.Z);
this.T = x9Var;
x9Var.I();
H0(o9a.f());
}
public void x4() {
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
if (petalMapsChildViewBinding != null) {
petalMapsChildViewBinding.buttonRideHailingCallRide.setOnClickListener(null);
}
}
public void x5() {
String b0 = p19.F().b0();
b0.hashCode();
switch (b0) {
case "0":
x1().l6();
break;
case "1":
case "4":
x1().q2();
break;
case "2":
x1().Z5(p19.F().t0());
break;
case "3":
x1().Z5(p19.F().Y());
break;
}
}
public void x6(FragmentActivity fragmentActivity, String str) {
if (this.l0 == null) {
return;
}
String str2 = this.F;
if (str2 != null) {
this.G.push(str2);
}
fo7.f().h();
u5(null, false);
this.E = RoadConditionSelectFragment.g.a(str);
this.F = RoadConditionSelectFragment.class.getSimpleName();
SlidingContainerManager.d().D(fragmentActivity, this.E);
}
public final void y0() {
int f0;
int i2;
int i3;
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) petalMapsToolbarBinding.weatherBadgeAndLogo.getLayoutParams();
MapImageView mapImageView = this.o0.petalMapsLogoScale;
ScreenDisplayStatus A = ct3.A(o41.c());
Object obj = this.Z;
BaseFragment<?> g2 = (obj == null || !(obj instanceof PetalMapsActivity)) ? null : nx6.a.g((PetalMapsActivity) obj);
int i4 = 155;
if (A == ScreenDisplayStatus.NORMAL_AND_PORTRAIT || A == ScreenDisplayStatus.PAD_AND_PORTRAIT) {
int i5 = u04.a.u() ? 60 : 12;
if (!isShowAlongCard()) {
if (!c06.c() || this.o0.getIsRoutePreferenceVisible()) {
f0 = ct3.f0(o41.c(), layoutParams.bottomMargin);
} else {
int f02 = ct3.f0(o41.c(), layoutParams.bottomMargin - this.o0.petalMapsRoutePreference.getHeight()) + 24;
if (f02 < 299) {
f02 = ct3.f0(o41.c(), layoutParams.bottomMargin) + 24;
}
i4 = f02;
if (g2 instanceof SelectPointFragment) {
f0 = ct3.f0(o41.c(), layoutParams.bottomMargin);
}
}
i4 = f0 + 32;
}
i2 = i5;
} else if (isShowAlongCard()) {
i2 = 23;
} else {
int f03 = ct3.f0(o41.c(), layoutParams.getMarginStart() + mapImageView.getPaddingStart());
if (mapImageView.getPaddingStart() == 0) {
f03 += 14;
}
if (u04.a.u()) {
f03 += 60;
}
i4 = ct3.f0(o41.c(), layoutParams.bottomMargin) + 32;
i2 = f03;
}
boolean Z = ct3.Z(o41.c());
if (com.huawei.maps.businessbase.utils.a.z()) {
i3 = i2 - 6;
if (Z) {
i3 = i2 - 8;
}
MapHelper.F2().P7(5);
} else {
if (Z) {
i2 += 2;
}
MapHelper.F2().P7(3);
i3 = i2;
}
MapHelper.F2().Q7(i3, i4);
this.b = true;
hm4.f("MapUIController", "setScaleLocation: " + i3 + " " + i4);
}
public boolean y1() {
PetalMapsChildViewBinding petalMapsChildViewBinding = this.n0;
return petalMapsChildViewBinding != null && petalMapsChildViewBinding.getShowMultiFilter();
}
public void y2(boolean z) {
if (this.n0 == null || this.o0 == null) {
hm4.p("MapUIController", "initDynamicOperateData mBinding null");
return;
}
if (!z || c06.b() || this.n0.getShowNaviCompletedPage()) {
this.o0.setShowDynamicIcon(false);
if (this.o0.bannersOperateFlipper.isFlipping()) {
this.o0.bannersOperateFlipper.stopFlipping();
return;
}
return;
}
this.o0.setShowDynamicIcon(true);
if (this.o0.bannersOperateFlipper.getChildCount() <= 1 || this.o0.bannersOperateFlipper.isFlipping()) {
return;
}
this.o0.bannersOperateFlipper.startFlipping();
}
public void y5(final RouteRefreshViewModel routeRefreshViewModel) {
x2();
Optional.ofNullable(this.T).ifPresent(new Consumer() {
@Override
public final void accept(Object obj) {
((x9) obj).i0(routeRefreshViewModel);
}
});
}
public void y6() {
if (this.l0 == null) {
return;
}
String str = this.F;
if (str != null) {
this.G.push(str);
}
this.E = new SatelliteOverviewFragment();
this.F = SatelliteOverviewFragment.class.getSimpleName();
if (this.Z instanceof FragmentActivity) {
SlidingContainerManager.d().D(this.Z, this.E);
}
}
public final void z0() {
int f0;
int f02;
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding == null) {
return;
}
MapImageView mapImageView = petalMapsToolbarBinding.petalMapsLogoScale;
RelativeLayout relativeLayout = petalMapsToolbarBinding.weatherBadgeAndLogo;
WeatherBadgeView weatherBadgeView = petalMapsToolbarBinding.weatherBadge;
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) relativeLayout.getLayoutParams();
if (com.huawei.maps.businessbase.utils.a.z()) {
MapHelper.F2().P7(5);
} else {
MapHelper.F2().P7(3);
}
int visibility = weatherBadgeView.getVisibility();
Integer num = (Integer) weatherBadgeView.e.getValue();
ScreenDisplayStatus A = ct3.A(o41.c());
if (num != null) {
int i2 = 155;
if (A == ScreenDisplayStatus.NORMAL_AND_PORTRAIT || A == ScreenDisplayStatus.PAD_AND_PORTRAIT) {
f0 = visibility == 0 ? ct3.f0(o41.c(), num.intValue() + mapImageView.getPaddingStart()) : ct3.f0(o41.c(), mapImageView.getPaddingStart());
if (!isShowAlongCard()) {
if (!c06.c() || this.o0.getIsRoutePreferenceVisible()) {
f02 = ct3.f0(o41.c(), layoutParams.bottomMargin);
} else {
i2 = ct3.f0(o41.c(), layoutParams.bottomMargin - this.o0.petalMapsRoutePreference.getHeight()) + 2;
if (i2 < 299) {
f02 = ct3.f0(o41.c(), layoutParams.bottomMargin);
}
}
i2 = f02 + 2;
}
if (mapImageView.getPaddingStart() == 0) {
f0 += 14;
}
if (com.huawei.maps.businessbase.utils.a.z()) {
f0 = visibility == 0 ? f0 - 14 : 8;
}
} else {
if (isShowAlongCard()) {
f0 = 23;
} else {
f0 = visibility == 0 ? ct3.f0(o41.c(), layoutParams.getMarginStart() + num.intValue() + mapImageView.getPaddingStart()) : ct3.f0(o41.c(), layoutParams.getMarginStart() + mapImageView.getPaddingStart());
if (mapImageView.getPaddingStart() == 0) {
f0 += 14;
}
}
if (!isShowAlongCard()) {
i2 = ct3.f0(o41.c(), layoutParams.bottomMargin) + 2;
}
}
MapHelper.F2().Q7(f0, i2);
this.b = true;
hm4.f("MapUIController", "setScaleLocation: " + f0 + " " + i2);
}
}
public boolean z1() {
PetalMapsOtherViewBinding petalMapsOtherViewBinding = this.m0;
if (petalMapsOtherViewBinding == null) {
return false;
}
return petalMapsOtherViewBinding.getIsShowOpacityCoatingView();
}
public void z2() {
fk2.f(new Runnable() {
@Override
public final void run() {
a.this.k3();
}
});
}
public final void z3(View view) {
PetalMapsToolbarBinding petalMapsToolbarBinding = this.o0;
if (petalMapsToolbarBinding != null) {
petalMapsToolbarBinding.setShowFutrueEta(false);
R4(true);
}
}
public void z4() {
boolean f2 = o9a.f();
ActivityPetalMapsBinding activityPetalMapsBinding = this.l0;
if (activityPetalMapsBinding != null) {
activityPetalMapsBinding.setIsDark(f2);
}
PetalMapsOtherViewBinding petalMapsOtherViewBinding = this.m0;
if (petalMapsOtherViewBinding != null) {
petalMapsOtherViewBinding.setIsDark(f2);
}
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding != null) {
homeSlideLayoutBinding.setIsDark(f2);
}
}
public boolean z5(Drawable drawable) {
HomeSlideLayoutBinding homeSlideLayoutBinding = this.r0;
if (homeSlideLayoutBinding != null) {
FrameLayout frameLayout = homeSlideLayoutBinding.themeView;
View view = homeSlideLayoutBinding.themeItem;
if (drawable == null) {
hm4.p("MapUIController", "setScrollPageLayoutBackground: null");
P5(frameLayout, x1().r1());
L5(z0, com.huawei.maps.commonui.R.color.hos_color_slide);
view.setBackground(null);
return false;
}
int[] iArr = new int[2];
frameLayout.getLocationOnScreen(iArr);
CustomHwBottomNavigationView r1 = x1().r1();
if (r1 != null && r1.getMeasuredHeight() + iArr[1] + frameLayout.getMeasuredHeight() > this.r0.scrollPageLayout.getScreenHeight()) {
hm4.p("MapUIController", "setScrollPageLayoutBackground: ");
P5(frameLayout, r1);
L5(y0, com.huawei.maps.commonui.R.color.black);
ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
int intrinsicWidth = drawable.getIntrinsicWidth();
if (intrinsicWidth != 0) {
layoutParams.height = (view.getMeasuredWidth() * drawable.getIntrinsicHeight()) / intrinsicWidth;
view.setBackground(drawable);
return true;
}
}
}
return false;
}
public void z6(FragmentActivity fragmentActivity, MicroMobilityCommonItem microMobilityCommonItem) {
if (this.l0 == null) {
return;
}
String str = this.F;
if (str != null) {
this.G.push(str);
}
this.E = new ScooterAndBikeDetailFragment();
SafeBundle safeBundle = new SafeBundle();
safeBundle.putSerializable("selected_micro_item", microMobilityCommonItem);
this.E.setArguments(safeBundle.getBundle());
this.F = ScooterAndBikeDetailFragment.class.getSimpleName();
SlidingContainerManager.d().D(fragmentActivity, this.E);
}
public void showCustomShareFragment(FragmentManager fragmentManager, String str, String str2, String str3, String str4, int i2) {
if (fragmentManager == null || TextUtils.isEmpty(str)) {
return;
}
ShareBottomSheetFragment shareBottomSheetFragment = new ShareBottomSheetFragment(str, str2, str3, str4, i2, false, "text/plain", (SaveBadgeShareDialogListener) null);
this.n = shareBottomSheetFragment;
shareBottomSheetFragment.show(fragmentManager, "dialog");
}
}