Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b9c6cb6 authored by Kshitij's avatar Kshitij
Browse files

chore: PhoneStatusBarView: Address more CR

parent 8a57e7c1
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -396,9 +396,8 @@ public class PhoneStatusBarView extends FrameLayout implements Callbacks {
        Intent intent = new Intent(Intent.ACTION_MAIN);
        intent.addCategory(Intent.CATEGORY_HOME);
        ResolveInfo resolveInfo = getContext().getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
        String homePackageName = "";
        if (resolveInfo != null) {
            homePackageName = resolveInfo.activityInfo.packageName;
            String homePackageName = resolveInfo.activityInfo.packageName;
            isHomePackage = homePackageName != null && homePackageName.equals(getForegroundApp());
        }
        int dockWidth = !isHomePackage ? 0 : Settings.Secure.getInt(getContext().getContentResolver(), BLISS_LAUNCHER_DOCK_WIDTH, 0);
@@ -424,16 +423,15 @@ public class PhoneStatusBarView extends FrameLayout implements Callbacks {
        RootTaskInfo info = null;
        try {
            info = mActivityTaskManager.getFocusedRootTaskInfo();
            if (info != null && info.topActivity != null) {
                return info.topActivity.getPackageName();
            }
        } catch (RemoteException e) {
            // Do nothing
        }
        if (info == null || info.topActivity == null) {
        return null;
    }

        return info.topActivity.getPackageName();
    }

    private void updateLayoutForCutout() {
        updateStatusBarHeight();
        updateCutoutLocation();