Skip to content

Commit

Permalink
Format x3
Browse files Browse the repository at this point in the history
  • Loading branch information
mrober committed Oct 30, 2023
1 parent 670f157 commit 57b1588
Show file tree
Hide file tree
Showing 20 changed files with 214 additions and 232 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ internal class SessionLifecycleServiceBinderImpl(private val firebaseApp: Fireba
}

companion object {
const val TAG = "SessionLifecycleServiceBinder"
const val TAG = "LifecycleServiceBinder"
}
}
100 changes: 50 additions & 50 deletions firebase-sessions/test-app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,61 +15,61 @@
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"/>
<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:name=".TestApplication"
android:supportsRtl="true"
android:theme="@style/Theme.Widget_test_app"
tools:targetApi="31">
<activity
android:exported="true"
android:label="@string/app_name"
android:name=".MainActivity"
android:theme="@style/Theme.Widget_test_app.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<application
android:name=".TestApplication"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.Widget_test_app"
tools:targetApi="31">
<meta-data
android:name="firebase_performance_logcat_enabled"
android:value="true" />
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.Widget_test_app.NoActionBar"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:exported="true"
android:label="@string/app_name"
android:name=".SecondActivity"
android:process=":second"
android:theme="@style/Theme.Widget_test_app.NoActionBar" />

<activity
android:name=".SecondActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.Widget_test_app.NoActionBar"
android:process=":second"/>
<meta-data
android:name="firebase_performance_logcat_enabled"
android:value="true" />

<receiver
android:name="CrashWidgetProvider"
android:process=":widgetProcess"
android:exported="false">
<intent-filter>
<action
android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/homescreen_widget" />
</receiver>
<receiver
android:exported="false"
android:name="CrashWidgetProvider"
android:process=":widgetProcess">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/homescreen_widget" />
</receiver>

<receiver android:name=".CrashBroadcastReceiver" />
<receiver android:name=".CrashBroadcastReceiver" />

<service
android:name=".ForegroundService"
android:process=":foregroundServiceProcess"
android:enabled="true"
android:exported="false" />
<service
android:enabled="true"
android:exported="false"
android:name=".ForegroundService"
android:process=":foregroundServiceProcess" />

</application>
</application>

<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />

<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,9 @@
package com.google.firebase.testing.sessions

import android.app.ActivityManager
import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.content.Intent.FLAG_ACTIVITY_NEW_TASK
import android.content.ServiceConnection
import android.os.Bundle
import android.os.IBinder
import android.os.Message
import android.os.Messenger
import android.os.RemoteException
import android.util.Log
import android.widget.Button

/** Second activity from the MainActivity that runs on a different process. */
Expand All @@ -42,7 +34,8 @@ class SecondActivity : BaseActivity() {
startActivity(intent)
}
findViewById<Button>(R.id.kill_background_processes).setOnClickListener {
getSystemService(ActivityManager::class.java).killBackgroundProcesses("com.google.firebase.testing.sessions")
getSystemService(ActivityManager::class.java)
.killBackgroundProcesses("com.google.firebase.testing.sessions")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package com.google.firebase.testing.sessions

import android.app.Application
import android.content.IntentFilter
import android.util.Log

class TestApplication : Application() {

Expand Down
12 changes: 6 additions & 6 deletions firebase-sessions/test-app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
-->

<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<include layout="@layout/content_main" />
<include layout="@layout/content_main" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
~ limitations under the License.
-->

<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
Expand All @@ -36,4 +35,3 @@
app:layout_constraintTop_toBottomOf="@id/prev_activity_button" />

</androidx.constraintlayout.widget.ConstraintLayout>

30 changes: 15 additions & 15 deletions firebase-sessions/test-app/src/main/res/layout/content_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@
-->

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">

<fragment
android:id="@+id/nav_host_fragment_content_main"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="0dp"
android:layout_height="0dp"
app:defaultNavHost="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/nav_graph" />
<fragment
android:id="@+id/nav_host_fragment_content_main"
android:layout_width="0dp"
android:layout_height="0dp"
android:name="androidx.navigation.fragment.NavHostFragment"
app:defaultNavHost="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/nav_graph" />
</androidx.constraintlayout.widget.ConstraintLayout>
10 changes: 4 additions & 6 deletions firebase-sessions/test-app/src/main/res/layout/crash_widget.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
-->


<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
Expand All @@ -25,15 +24,14 @@
android:id="@+id/widgetCrashButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/widget_crash_button_text"/>
android:text="@string/widget_crash_button_text" />

<TextView
android:id="@+id/widgetTimeText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="32dp"
android:text=""
android:textColor="#fafafa"
android:text=""/>
android:textSize="32dp" />

</LinearLayout>

Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
~ limitations under the License.
-->

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
Expand All @@ -24,8 +23,6 @@
android:id="@+id/widgetCrashButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/widget_crash_button_text"/>
android:text="@string/widget_crash_button_text" />

</LinearLayout>


95 changes: 47 additions & 48 deletions firebase-sessions/test-app/src/main/res/layout/fragment_first.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,64 +13,63 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".FirstFragment">
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".FirstFragment">

<Button
android:id="@+id/button_crash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/crash_button_text" />
<Button
android:id="@+id/button_crash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/crash_button_text" />

<Button
android:id="@+id/button_non_fatal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/non_fatal_button_text"
app:layout_constraintTop_toBottomOf="@id/button_crash" />
<Button
android:id="@+id/button_non_fatal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/non_fatal_button_text"
app:layout_constraintTop_toBottomOf="@id/button_crash" />

<Button
android:id="@+id/button_anr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_anr_text"
app:layout_constraintTop_toBottomOf="@id/button_non_fatal" />
<Button
android:id="@+id/button_anr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_anr_text"
app:layout_constraintTop_toBottomOf="@id/button_non_fatal" />

<Button
android:id="@+id/button_foreground_process"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/start_foreground_service_text"
app:layout_constraintTop_toBottomOf="@id/button_anr" />
<Button
android:id="@+id/button_foreground_process"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/start_foreground_service_text"
app:layout_constraintTop_toBottomOf="@id/button_anr" />

<Button
android:id="@+id/start_splitscreen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/start_splitcreen_text"
app:layout_constraintTop_toBottomOf="@id/button_foreground_process" />
<Button
android:id="@+id/start_splitscreen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/start_splitcreen_text"
app:layout_constraintTop_toBottomOf="@id/button_foreground_process" />

<Button
android:id="@+id/start_splitscreen_same"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/start_splitcreen_same_text"
app:layout_constraintTop_toBottomOf="@id/start_splitscreen" />
<Button
android:id="@+id/start_splitscreen_same"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/start_splitcreen_same_text"
app:layout_constraintTop_toBottomOf="@id/start_splitscreen" />

<Button
android:id="@+id/next_activity_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/next_activity_text"
app:layout_constraintTop_toBottomOf="@id/start_splitscreen_same" />
<Button
android:id="@+id/next_activity_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/next_activity_text"
app:layout_constraintTop_toBottomOf="@id/start_splitscreen_same" />

</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
Loading

0 comments on commit 57b1588

Please sign in to comment.