Browse Source

For #4132: remove BrowserPerformanceTestActivity & usages.

master
Michael Comella 2 years ago
committed by Michael Comella
parent
commit
27c8a77c3f
  1. 7
      app/src/geckoBeta/java/org/mozilla/fenix/engine/GeckoProvider.kt
  2. 7
      app/src/geckoNightly/java/org/mozilla/fenix/engine/GeckoProvider.kt
  3. 5
      app/src/main/AndroidManifest.xml
  4. 33
      app/src/main/java/org/mozilla/fenix/browser/BrowserPerformanceTestActivity.kt
  5. 4
      app/src/main/java/org/mozilla/fenix/session/PerformanceActivityLifecycleCallbacks.kt

7
app/src/geckoBeta/java/org/mozilla/fenix/engine/GeckoProvider.kt

@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import android.content.Context
import android.os.Bundle
import mozilla.components.browser.engine.gecko.autofill.GeckoLoginDelegateWrapper
import mozilla.components.browser.engine.gecko.ext.toContentBlockingSetting
import mozilla.components.browser.engine.gecko.glean.GeckoAdapter
@ -17,7 +16,6 @@ import org.mozilla.geckoview.GeckoRuntime
import org.mozilla.geckoview.GeckoRuntimeSettings
object GeckoProvider {
var testConfig: Bundle? = null
private var runtime: GeckoRuntime? = null
@Synchronized
@ -40,11 +38,6 @@ object GeckoProvider {
): GeckoRuntime {
val builder = GeckoRuntimeSettings.Builder()
testConfig?.let {
builder.extras(it)
.remoteDebuggingEnabled(true)
}
val runtimeSettings = builder
.crashHandler(CrashHandlerService::class.java)
.telemetryDelegate(GeckoAdapter())

7
app/src/geckoNightly/java/org/mozilla/fenix/engine/GeckoProvider.kt

@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import android.content.Context
import android.os.Bundle
import mozilla.components.browser.engine.gecko.autofill.GeckoLoginDelegateWrapper
import mozilla.components.browser.engine.gecko.ext.toContentBlockingSetting
import mozilla.components.browser.engine.gecko.glean.GeckoAdapter
@ -17,7 +16,6 @@ import org.mozilla.geckoview.GeckoRuntime
import org.mozilla.geckoview.GeckoRuntimeSettings
object GeckoProvider {
var testConfig: Bundle? = null
private var runtime: GeckoRuntime? = null
@Synchronized
@ -40,11 +38,6 @@ object GeckoProvider {
): GeckoRuntime {
val builder = GeckoRuntimeSettings.Builder()
testConfig?.let {
builder.extras(it)
.remoteDebuggingEnabled(true)
}
val runtimeSettings = builder
.crashHandler(CrashHandlerService::class.java)
.telemetryDelegate(GeckoAdapter())

5
app/src/main/AndroidManifest.xml

@ -217,11 +217,6 @@
<activity android:name=".widget.VoiceSearchActivity" />
<activity
android:name=".browser.BrowserPerformanceTestActivity"
android:enabled="${isRaptorEnabled}"
android:exported="${isRaptorEnabled}" />
<activity
android:name=".settings.account.AuthCustomTabActivity"
android:autoRemoveFromRecents="false"

33
app/src/main/java/org/mozilla/fenix/browser/BrowserPerformanceTestActivity.kt

@ -1,33 +0,0 @@
/* 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.fenix.browser
import GeckoProvider
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import mozilla.components.support.utils.SafeIntent
import org.mozilla.fenix.IntentReceiverActivity
/**
* This activity is used for performance testing with Raptor/tp6:
* https://wiki.mozilla.org/Performance_sheriffing/Raptor
*/
class BrowserPerformanceTestActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
GeckoProvider.testConfig = SafeIntent(intent).extras
val intent = Intent(intent)
intent.setClassName(applicationContext, IntentReceiverActivity::class.java.name)
startActivity(intent)
finish()
}
}

4
app/src/main/java/org/mozilla/fenix/session/PerformanceActivityLifecycleCallbacks.kt

@ -10,7 +10,6 @@ import android.os.Bundle
import mozilla.components.support.utils.RunWhenReadyQueue
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.IntentReceiverActivity
import org.mozilla.fenix.browser.BrowserPerformanceTestActivity
import org.mozilla.fenix.settings.account.AuthIntentReceiverActivity
import org.mozilla.fenix.widget.VoiceSearchActivity
@ -37,8 +36,7 @@ class PerformanceActivityLifecycleCallbacks(
return isTransientActivityInMigrationVariant(activity) ||
(activity is IntentReceiverActivity) ||
(activity is VoiceSearchActivity) ||
(activity is AuthIntentReceiverActivity) ||
(activity is BrowserPerformanceTestActivity)
(activity is AuthIntentReceiverActivity)
}
/**

Loading…
Cancel
Save