Closed Bug 1376995 Opened 2 years ago Closed 2 years ago

(photon) Update status bar color while switching between normal mode and private mode

Categories

(Firefox for Android :: General, defect)

defect
Not set

Tracking

()

VERIFIED FIXED
Firefox 57
Tracking Status
firefox57 --- verified

People

(Reporter: jwu, Assigned: jwu)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [FNC][SPT57.1][MVP])

Attachments

(1 file)

No description provided.
Assignee: nobody → topwu.tw
Comment on attachment 8890718 [details]
Bug 1376995 - Update status bar color while switching between normal mode and private mode.

https://reviewboard.mozilla.org/r/161886/#review169534

::: mobile/android/base/java/org/mozilla/gecko/BrowserApp.java:2274
(Diff revision 2)
>                  delegate.onTabsTrayShown(this, mTabsPanel);
>              }
>          }
> +
> +        // Since tabs tray only has dark theme, always update the status bar with dark background.
> +        WindowUtil.invalidateStatusBarColor(this, /* forceDark = */ true);

I think write comment inside a line of code is not a good idea, is this necessary?

::: mobile/android/base/java/org/mozilla/gecko/util/WindowUtil.java:55
(Diff revision 2)
> +        } else {
> +            if (forceDark) { // Force to use dark background color
> +                colorResId = R.color.status_bar_bg_color_private;
> +                darkForeground = false;
> +            } else {
> +                final Tab tab = Tabs.getInstance().getSelectedTab();

If possible, to pass 'isPrivate' as parameter to here, might be better than access `Tab` here.
Attachment #8890718 - Flags: review?(walkingice0204) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/3cd5947b10f1
Update status bar color while switching between normal mode and private mode. r=walkingice
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/3cd5947b10f1
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Whiteboard: [FNC][SPT_57.1][MVP]
Whiteboard: [FNC][SPT_57.1][MVP] → [FNC][SPT57.1][MVP]
Depends on: 1393754
Verified as fixed on Nightly 57 (2017-08-24).
Works fine on these devices:
Xiaomi Mi Pad 2 (Android 5.1)
Oneplus Two (Android 6.0.1)
LG Nexus 5 (Android 6.0.1)
HTC 10 (Android 7.0.1)

The status bar color is not changed on some devices:
Prestigio Grace X5 (Android 4.4.2)
HTC Nexus 9 (Android 7.1.1)
Xiaomi Mi Pad 2 (Android 5.1)
Lenovo Yoga Tablet 2 (Android 4.4.2)
I've logged a new issue for this: 1393754
Status: RESOLVED → VERIFIED
No longer depends on: 1393754
You need to log in before you can comment on or make changes to this bug.