Stop using BuildInfo#isGreaterThanN. |
|||||
Issue descriptionBuildInfo#isGreaterThanN actually returns true for N, which is misleading. We should have code that actually needs to know if we are greater than N use isAtLeastO, and remove this API. Assigning to twellington@ since it looks like there is only a couple of uses of it remaining in ChromeTabbedActivity and ApiCompatibilityUtils. Do you mind taking a look? https://cs.chromium.org/search/?q=isGreaterThanN&type=cs
,
Mar 31 2017
Note that the method returns false for regular N (level 24 API) and true for N-MR1 (level 25 API).
,
Mar 31 2017
I asked khushalsagar@ to mark this as an RB-Stable for M58 to ensure if we had any other leftover checks in place related to N they were evaluated (and updated if necessary) before we shipped O. If all the existing uses are correct then we can close this out.
,
Mar 31 2017
,
Mar 31 2017
The existing checks are correct (they're both for NMR1 features -- shortcuts and Nexus retail mode). Since the NMR1 SDK isn't public yet, we still need this method. I can change the method name to isAtLeastNMR1 to match the new isAtLeastO if that's helpful?
,
Mar 31 2017
Actually, it looks like NMR1 was moved to our upstream repro as of 3/16: https://chromium.googlesource.com/android_tools.git/+/b65c4776dac2cf1b80e969b3b2d4e081b9c84f29 I can remove the ApiCompatibilityUtils method, but this definitely doesn't need to get merged to M58.
,
Mar 31 2017
I think just changing the name to isAtLeastNMR1 would keep people from accidentally using it incorrectly in the future. So that would definitely be awesome. :)
,
Mar 31 2017
I have a patch out for review that removes the method and cleans up the reflection introduced for NMR1. https://codereview.chromium.org/2785373004/
,
Mar 31 2017
Thanks Theresa!
,
Apr 4 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/df46c2242e4635dc77fce945bfc0ea0089efee31 commit df46c2242e4635dc77fce945bfc0ea0089efee31 Author: twellington <twellington@chromium.org> Date: Tue Apr 04 18:46:21 2017 Remove BuildInfo#isGreaterThanN() The NMR1 SDK has been published upstream, so BuildInfo#isGreaterThanN is no longer needed. This patch also removes reflection for UserManager#isDemoUser() and ShortcutManager#reportShortcutUsed(), and updates AndroidManifest.xml to remove the conditional include of launchershortcut.xml and network_security_config.xml. BUG= 707302 Review-Url: https://codereview.chromium.org/2785373004 Cr-Commit-Position: refs/heads/master@{#461787} [modify] https://crrev.com/df46c2242e4635dc77fce945bfc0ea0089efee31/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java [modify] https://crrev.com/df46c2242e4635dc77fce945bfc0ea0089efee31/base/android/java/src/org/chromium/base/BuildInfo.java [modify] https://crrev.com/df46c2242e4635dc77fce945bfc0ea0089efee31/build/android/lint/suppressions.xml [modify] https://crrev.com/df46c2242e4635dc77fce945bfc0ea0089efee31/chrome/android/BUILD.gn [modify] https://crrev.com/df46c2242e4635dc77fce945bfc0ea0089efee31/chrome/android/java/AndroidManifest.xml [modify] https://crrev.com/df46c2242e4635dc77fce945bfc0ea0089efee31/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
,
Apr 6 2017
The following revision refers to this bug: https://chrome-internal.googlesource.com/clank/internal/apps/+/46b5adcb1c2e9281dcf812b16dd3e4f46e7c804e commit 46b5adcb1c2e9281dcf812b16dd3e4f46e7c804e Author: Theresa Wellington <twellington@google.com> Date: Thu Apr 06 19:11:25 2017
,
May 11 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by twelling...@chromium.org
, Mar 31 2017