Apply liberate patch

Apply https://gitlab.com/relan/fennecbuild/-/blob/master/fenix-liberate.patch
at edac9bd4083644ae0b8ae04e6af719892f05ee3a

License sign-off from author "relan" in
https://gitlab.com/relan/fennecbuild/-/issues/4#note_404430753

"Note that fenix-liberate.patch is a copypaste from various projects under
Apache 2.0 and MPL 2.0. I've made only trivial changes and it makes sense to
distribute them under MPL 2.0 or Apache 2.0, not AGPL.

I think I need to add license headers to all new files added by the patch."

We can pick up additional license headers if and when they're added by relan.
Almost all the code is trivial, probably-uncopyrightable stubs.

We might be supposed to put more info in the licenses screen in the app, which
I'm keeping, for some of these, but I'm not sure how.
pull/58/head
Adam Novak 4 years ago
parent 670589aaae
commit ba91b74887

@ -7,7 +7,6 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'jacoco'
apply plugin: 'androidx.navigation.safeargs.kotlin'
apply plugin: 'com.google.android.gms.oss-licenses-plugin'
import com.android.build.OutputFile
@ -367,8 +366,6 @@ dependencies {
implementation Deps.sentry
implementation Deps.leanplum_core
implementation Deps.leanplum_fcm
implementation Deps.mozilla_concept_engine
implementation Deps.mozilla_concept_menu
@ -447,7 +444,6 @@ dependencies {
implementation Deps.mozilla_ui_widgets
implementation Deps.mozilla_lib_crash
implementation Deps.mozilla_lib_push_firebase
implementation Deps.mozilla_lib_dataprotect
debugImplementation Deps.leakcanary
forkDebugImplementation Deps.leakcanary
@ -471,10 +467,7 @@ dependencies {
implementation Deps.lottie
implementation Deps.adjust
implementation Deps.installreferrer // Required by Adjust
implementation Deps.google_ads_id // Required for the Google Advertising ID
implementation Deps.google_play_store // Required for in-app reviews

@ -0,0 +1,15 @@
package com.adjust.sdk;
public class Adjust {
public static void onCreate(AdjustConfig adjustConfig) {
}
public static void onResume() {
}
public static void onPause() {
}
public static void setEnabled(boolean enabled) {
}
}

@ -0,0 +1,25 @@
package com.adjust.sdk;
import java.io.Serializable;
public class AdjustAttribution implements Serializable {
public String network;
public String campaign;
public String adgroup;
public String creative;
@Override
public boolean equals(Object other) {
return false;
}
@Override
public int hashCode() {
return 0;
}
@Override
public String toString() {
return "";
}
}

@ -0,0 +1,22 @@
package com.adjust.sdk;
import android.content.Context;
import java.util.List;
public class AdjustConfig {
public static final String ENVIRONMENT_SANDBOX = "sandbox";
public static final String ENVIRONMENT_PRODUCTION = "production";
public AdjustConfig(Context context, String appToken, String environment) {
}
public AdjustConfig(Context context, String appToken, String environment, boolean allowSuppressLogLevel) {
}
public void setOnAttributionChangedListener(OnAttributionChangedListener onAttributionChangedListener) {
}
public void setLogLevel(LogLevel logLevel) {
}
}

@ -0,0 +1,19 @@
package com.adjust.sdk;
import android.util.Log;
/**
* Created by pfms on 11/03/15.
*/
public enum LogLevel {
VERBOSE(Log.VERBOSE), DEBUG(Log.DEBUG), INFO(Log.INFO), WARN(Log.WARN), ERROR(Log.ERROR), ASSERT(Log.ASSERT), SUPRESS(8);
final int androidLogLevel;
LogLevel(final int androidLogLevel) {
this.androidLogLevel = androidLogLevel;
}
public int getAndroidLogLevel() {
return androidLogLevel;
}
}

@ -0,0 +1,5 @@
package com.adjust.sdk;
public interface OnAttributionChangedListener {
void onAttributionChanged(AdjustAttribution attribution);
}

@ -0,0 +1,19 @@
package com.google.android.gms.ads.identifier;
import android.content.Context;
public class AdvertisingIdClient {
public static final class Info {
public String getId() {
return "";
}
}
public static Info getAdvertisingIdInfo(Context context) {
return new Info();
}
}

@ -0,0 +1,4 @@
package com.google.android.gms.common;
public class GooglePlayServicesNotAvailableException extends Exception {
}

@ -0,0 +1,4 @@
package com.google.android.gms.common;
public class GooglePlayServicesRepairableException extends Exception {
}

@ -0,0 +1,29 @@
package com.google.firebase.messaging;
import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
public class FirebaseMessagingService extends Service {
private final IBinder mBinder = new Binder();
public void onMessageReceived(RemoteMessage message) {
}
public void onMessageSent(String msgId) {
}
public void onNewToken(String token) {
}
public void onSendError(String msgId, Exception exception) {
}
@Override
public IBinder onBind(Intent intent) {
return mBinder;
}
}

@ -0,0 +1,20 @@
package com.google.firebase.messaging;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.Map;
public class RemoteMessage implements Parcelable {
public int describeContents() {
return 0;
}
public void writeToParcel(Parcel out, int flags) {
}
public Map<String, String> getData() {
return null;
}
}

@ -0,0 +1,88 @@
/*
* Copyright 2016, Leanplum, Inc. All rights reserved.
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.leanplum;
import android.content.Context;
import com.leanplum.callbacks.StartCallback;
import java.util.Map;
public class Leanplum {
public static void setAppIdForDevelopmentMode(String appId, String accessKey) {
}
public static void setAppIdForProductionMode(String appId, String accessKey) {
}
public static void setApplicationContext(Context context) {
}
public static void setDeviceId(String deviceId) {
}
public static void setIsTestModeEnabled(boolean isTestModeEnabled) {
}
public static void start(Context context) {
}
public static void start(Context context, StartCallback callback) {
}
public static void start(Context context, Map<String, ?> userAttributes) {
}
public static void start(Context context, String userId) {
}
public static void start(Context context, String userId, StartCallback callback) {
}
public static void start(Context context, String userId, Map<String, ?> userAttributes) {
}
public static synchronized void start(final Context context, String userId, Map<String, ?> attributes, StartCallback response) {
}
static synchronized void start(final Context context, final String userId, final Map<String, ?> attributes, StartCallback response, final Boolean isBackground) {
}
public static void track(final String event, double value, String info, Map<String, ?> params) {
}
public static void track(String event) {
}
public static void track(String event, double value) {
}
public static void track(String event, String info) {
}
public static void track(String event, Map<String, ?> params) {
}
public static void track(String event, double value, Map<String, ?> params) {
}
public static void track(String event, double value, String info) {
}
}

@ -0,0 +1,29 @@
/*
* Copyright 2013, Leanplum, Inc. All rights reserved.
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.leanplum;
import android.app.Application;
public class LeanplumActivityHelper {
public static void enableLifecycleCallbacks(final Application app) {
}
}

@ -0,0 +1,44 @@
/*
* Copyright 2016, Leanplum, Inc. All rights reserved.
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.leanplum;
import android.annotation.SuppressLint;
import android.os.Build;
import android.os.Bundle;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
@SuppressLint("Registered")
public class LeanplumPushFirebaseMessagingService extends FirebaseMessagingService {
@Override
public void onCreate() {
}
@Override
public void onNewToken(String token) {
}
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
}
}

@ -0,0 +1,65 @@
/*
* Copyright 2015, Leanplum, Inc. All rights reserved.
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.leanplum;
import android.app.Notification;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.core.app.NotificationCompat;
/**
* Implement LeanplumPushNotificationCustomizer to customize the appearance of notifications.
*/
public interface LeanplumPushNotificationCustomizer {
/**
* Implement this method to customize push notification. Please call {@link
* LeanplumPushService#setCustomizer(LeanplumPushNotificationCustomizer)} to activate this method.
* Leave this method empty if you want to support 2 lines of text
* in BigPicture style push notification and implement {@link
* LeanplumPushNotificationCustomizer#customize(Notification.Builder, Bundle, Notification.Style)}
*
* @param builder NotificationCompat.Builder for push notification.
* @param notificationPayload Bundle notification payload.
*/
void customize(NotificationCompat.Builder builder, Bundle notificationPayload);
/**
* Implement this method to support 2 lines of text in BigPicture style push notification,
* otherwise implement {@link
* LeanplumPushNotificationCustomizer#customize(NotificationCompat.Builder, Bundle)} and leave
* this method empty. Please call {@link
* LeanplumPushService#setCustomizer(LeanplumPushNotificationCustomizer, boolean)} with true
* value to activate this method.
*
* @param builder Notification.Builder for push notification.
* @param notificationPayload Bundle notification payload.
* @param notificationStyle - Notification.BigPictureStyle or null - BigPicture style for current
* push notification. Call ((Notification.BigPictureStyle) notificationStyle).bigLargeIcon(largeIcon)
* if you want to set large icon on expanded push notification. If notificationStyle wasn't null
* it will be set to push notification. Note: If you call notificationStyle = new
* Notification.BigPictureStyle() or other Notification.Style - there will be no support 2 lines
* of text on BigPicture push and you need to call builder.setStyle(notificationStyle) to set
* yours expanded layout for push notification.
*/
void customize(Notification.Builder builder, Bundle notificationPayload,
@Nullable Notification.Style notificationStyle);
}

@ -0,0 +1,31 @@
/*
* Copyright 2014, Leanplum, Inc. All rights reserved.
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.leanplum;
public class LeanplumPushService {
public static void setCustomizer(LeanplumPushNotificationCustomizer customizer) {
}
public static void setCustomizer(LeanplumPushNotificationCustomizer customizer,
boolean useNotificationBuilderCustomizer) {
}
}

@ -0,0 +1,27 @@
/*
* Copyright 2013, Leanplum, Inc. All rights reserved.
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.leanplum.annotations;
public class Parser {
public static void parseVariables(Object... instances) {
}
}

@ -0,0 +1,41 @@
/*
* Copyright 2013, Leanplum, Inc. All rights reserved.
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.leanplum.callbacks;
/**
* Callback that gets run when Leanplum is started.
*
* @author Andrew First
*/
public abstract class StartCallback implements Runnable {
private boolean success;
public void setSuccess(boolean success) {
this.success = success;
}
public void run() {
this.onResponse(success);
}
public abstract void onResponse(boolean success);
}

@ -0,0 +1,33 @@
/*
* Copyright 2016, Leanplum, Inc. All rights reserved.
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.leanplum.internal;
public class LeanplumInternal {
public static void setCalledStart(boolean calledStart) {
}
public static void setHasStarted(boolean hasStarted) {
}
public static void setStartedInBackground(boolean startedInBackground) {
}
}

@ -0,0 +1,32 @@
/* 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 mozilla.components.lib.push.firebase
import android.content.Context
import com.google.firebase.messaging.FirebaseMessagingService
import com.google.firebase.messaging.RemoteMessage
import mozilla.components.concept.push.PushService
abstract class AbstractFirebasePushService() : FirebaseMessagingService(), PushService {
override fun start(context: Context) {
}
override fun onNewToken(newToken: String) {
}
override fun onMessageReceived(remoteMessage: RemoteMessage?) {
}
final override fun stop() {
}
override fun deleteToken() {
}
override fun isServiceAvailable(context: Context): Boolean {
return false
}
}

@ -270,17 +270,17 @@ class Settings(private val appContext: Context) : PreferencesHolder {
val isTelemetryEnabled by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_telemetry),
default = true
default = false
)
val isMarketingTelemetryEnabled by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_marketing_telemetry),
default = true
default = false
)
val isExperimentationEnabled by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_experimentation),
default = true
default = false
)
private var trackingProtectionOnboardingShownThisSession = false

@ -119,11 +119,6 @@
android:key="@string/pref_key_notifications"
android:title="@string/preferences_notifications" />
<androidx.preference.Preference
android:icon="@drawable/ic_data_collection"
android:key="@string/pref_key_data_choices"
android:title="@string/preferences_data_collection" />
</androidx.preference.PreferenceCategory>
<PreferenceCategory
@ -167,11 +162,6 @@
android:title="@string/preferences_category_about"
app:iconSpaceReserved="false"
android:layout="@layout/preference_category_main_style">
<androidx.preference.Preference
android:icon="@drawable/ic_bookmark_outline"
android:key="@string/pref_key_rate"
android:title="@string/preferences_rate" />
<androidx.preference.Preference
android:icon="@drawable/ic_info"
android:key="@string/pref_key_about"

@ -62,7 +62,6 @@ buildscript {
classpath Deps.tools_kotlingradle
classpath Deps.androidx_safeargs
classpath Deps.allopen
classpath Deps.osslicenses_plugin
classpath "org.mozilla.components:tooling-glean-gradle:${Versions.mozilla_android_components}"

@ -133,7 +133,6 @@ object Deps {
const val mozilla_ui_widgets = "org.mozilla.components:ui-widgets:${Versions.mozilla_android_components}"
const val mozilla_lib_crash = "org.mozilla.components:lib-crash:${Versions.mozilla_android_components}"
const val mozilla_lib_push_firebase = "org.mozilla.components:lib-push-firebase:${Versions.mozilla_android_components}"
const val mozilla_lib_dataprotect = "org.mozilla.components:lib-dataprotect:${Versions.mozilla_android_components}"
const val mozilla_lib_publicsuffixlist = "org.mozilla.components:lib-publicsuffixlist:${Versions.mozilla_android_components}"
@ -151,9 +150,6 @@ object Deps {
const val sentry = "io.sentry:sentry-android:${Versions.sentry}"
const val leakcanary = "com.squareup.leakcanary:leakcanary-android:${Versions.leakcanary}"
const val leanplum_core = "com.leanplum:leanplum-core:${Versions.leanplum}"
const val leanplum_fcm = "com.leanplum:leanplum-fcm:${Versions.leanplum}"
const val androidx_annotation = "androidx.annotation:annotation:${Versions.androidx_annotation}"
const val androidx_biometric = "androidx.biometric:biometric:${Versions.androidx_biometric}"
const val androidx_fragment = "androidx.fragment:fragment-ktx:${Versions.androidx_fragment}"
@ -177,9 +173,6 @@ object Deps {
const val androidx_work_testing = "androidx.work:work-testing:${Versions.androidx_work}"
const val google_material = "com.google.android.material:material:${Versions.google_material}"
const val adjust = "com.adjust.sdk:adjust-android:${Versions.adjust}"
const val installreferrer = "com.android.installreferrer:installreferrer:${Versions.installreferrer}"
const val junit = "junit:junit:${Versions.junit}"
const val mockk = "io.mockk:mockk:${Versions.mockk}"

Loading…
Cancel
Save