New issue
Advanced search Search tips

Issue 865061 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 18
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

Duet crashing on CCT

Project Member Reported by mdjones@chromium.org, Jul 18

Issue description

CCTs crash if Duet is enabled on ToT:

Binary XML file line #6: Attempt to invoke virtual method 'android.view.ViewParent android.view.View.getParent()' on a null object reference
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewParent android.view.View.getParent()' on a null object reference
	at org.chromium.ui.UiUtils.removeViewFromParent(UiUtils.java:512)
	at org.chromium.chrome.browser.toolbar.ToolbarLayout.onFinishInflate(ToolbarLayout.java:160)
	at org.chromium.chrome.browser.toolbar.CustomTabToolbar.onFinishInflate(CustomTabToolbar.java:159)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:876)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
...

We can fix this by moving that block of logic up to ToolbarPhone#onFinishInflate (the only place we'll need to do things for Duet).
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d72db906acff2772870b45f08f5425a8220ed6c7

commit d72db906acff2772870b45f08f5425a8220ed6c7
Author: Matthew Jones <mdjones@chromium.org>
Date: Wed Jul 18 17:09:27 2018

Only remove menu button for duet in ToolbarPhone

FeatureUtilities#isBottomToolbarEnabled is agnostic to whether Chrome
is in an activity that supports Duet. This patch moves the logic for
whether to remove the menu button from the top toolbar to
ToolbarPhone, where Duet is always supported.

Bug:  865061 
Change-Id: Icfceddf92d04722bb9e8d20266e671642c50033d
Reviewed-on: https://chromium-review.googlesource.com/1142137
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576101}
[modify] https://crrev.com/d72db906acff2772870b45f08f5425a8220ed6c7/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarLayout.java
[modify] https://crrev.com/d72db906acff2772870b45f08f5425a8220ed6c7/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java

Status: Fixed (was: Started)

Sign in to add a comment