Closed Bug 1415778 Opened 2 years ago Closed 2 years ago

Stop using AppConstants in GeckoView

Categories

(Firefox Build System :: Android Studio and Gradle Integration, enhancement)

enhancement
Not set

Tracking

(firefox59 fixed)

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: nalexander, Assigned: nalexander)

References

Details

Attachments

(4 files)

GeckoView currently uses AppConstants and its own BuildConfig.  BuildConfig is the Gradle-supported way of doing this type of constant interpolation; we should use it instead of the moz.build equivalent.
Comment on attachment 8926935 [details]
Bug 1415778 - Part 1: Stop using AppConstants.Versions.

https://reviewboard.mozilla.org/r/198180/#review203448

::: commit-message-b9506:3
(Diff revision 1)
> +Bug 1415778 - Part 1: Stop using AppConstants.Versions. r=darchons
> +
> +Versions is no more efficient than checking android.os.Build, and it

That's not quite true - Versions can statically evaluate to true or false the moment our MIN_SDK_VERSION has been bumped, but in the big scheme of things I guess it's not worth blocking things just because of that.
jchen: review ping.  Should I reassign this?
Flags: needinfo?(nchen)
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
Ah reviewboard didn't send out review requests. I'll review.
Flags: needinfo?(nchen)
Comment on attachment 8926934 [details]
Bug 1415778 - Pre: Don't use ANDROID_PACKAGE_NAME in GeckoView.

https://reviewboard.mozilla.org/r/198178/#review204552
Attachment #8926934 - Flags: review+
(In reply to Jim Chen [:jchen] [:darchons] from comment #7)
> Ah reviewboard didn't send out review requests. I'll review.

Huh, this must be a r=darchons issue.  Sorry!
Comment on attachment 8926935 [details]
Bug 1415778 - Part 1: Stop using AppConstants.Versions.

https://reviewboard.mozilla.org/r/198180/#review204554

::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/GeckoSurface.java:10
(Diff revision 1)
>  
>  package org.mozilla.gecko.gfx;
>  
>  import android.graphics.SurfaceTexture;
>  
> +import android.os.Build;

Unused

::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/MediaDrmProxy.java:13
(Diff revision 1)
>  import java.util.ArrayList;
>  import java.util.UUID;
>  
>  import org.mozilla.gecko.mozglue.JNIObject;
>  import org.mozilla.gecko.annotation.WrapForJNI;
>  import org.mozilla.gecko.AppConstants;

Remove

::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/RemoteMediaDrmBridgeStub.java:6
(Diff revision 1)
>  /* This Source Code Form is subject to the terms of the Mozilla Public
>   * License, v. 2.0. If a copy of the MPL was not distributed with this
>   * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
>  
>  package org.mozilla.gecko.media;
>  import org.mozilla.gecko.AppConstants;

Remove

::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/ActivityUtils.java:17
(Diff revision 1)
>  import android.os.Build;
>  import android.view.View;
>  import android.view.Window;
>  import android.view.WindowManager;
>  
>  import org.mozilla.gecko.AppConstants;

Remove

::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/GeckoBundle.java:10
(Diff revision 1)
>  
>  package org.mozilla.gecko.util;
>  
>  import org.mozilla.gecko.annotation.RobocopTarget;
>  import org.mozilla.gecko.annotation.WrapForJNI;
>  import org.mozilla.gecko.AppConstants;

Remove
Attachment #8926935 - Flags: review+
Comment on attachment 8926936 [details]
Bug 1415778 - Part 2: Move AppConstants to o.m.geckoview.BuildConfig.

https://reviewboard.mozilla.org/r/198182/#review204558
Attachment #8926936 - Flags: review+
Pushed by nalexander@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/69e4021ca540
Pre: Don't use ANDROID_PACKAGE_NAME in GeckoView. r=jchen
https://hg.mozilla.org/integration/autoland/rev/cf5e219ebfda
Part 1: Stop using AppConstants.Versions. r=jchen
https://hg.mozilla.org/integration/autoland/rev/721a4ebc14c4
Part 2: Move AppConstants to o.m.geckoview.BuildConfig. r=jchen
https://hg.mozilla.org/integration/autoland/rev/e4807befdc6a
Part 3: Fix up Gradle. r=jchen
Target Milestone: Firefox 58 → Firefox 59
Blocks: 1419677
Depends on: 1427285
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 59 → mozilla59
You need to log in before you can comment on or make changes to this bug.