Skip to content

Commit 1eca6fd

Browse files
authored
Wear: Avoiding application crashes when requesting ToS page (#2984)
1 parent 9bb8ab5 commit 1eca6fd

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

play-services-core/src/main/AndroidManifest.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,16 @@
441441
</intent-filter>
442442
</service>
443443

444+
<activity
445+
android:name="com.google.android.gms.wearable.consent.TermsOfServiceActivity"
446+
android:process=":ui"
447+
android:configChanges="screenSize|orientation|keyboardHidden">
448+
<intent-filter>
449+
<action android:name="com.google.android.gms.wearable.TOS"/>
450+
<category android:name="android.intent.category.DEFAULT"/>
451+
</intent-filter>
452+
</activity>
453+
444454
<!-- Auth -->
445455

446456
<service android:name="org.microg.gms.auth.loginservice.GoogleLoginService">
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* SPDX-FileCopyrightText: 2025 microG Project Team
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
package com.google.android.gms.wearable.consent
7+
8+
import android.os.Bundle
9+
import androidx.appcompat.app.AppCompatActivity
10+
11+
class TermsOfServiceActivity : AppCompatActivity() {
12+
13+
override fun onCreate(savedInstanceState: Bundle?) {
14+
super.onCreate(savedInstanceState)
15+
setResult(RESULT_CANCELED)
16+
finish()
17+
}
18+
}

0 commit comments

Comments
 (0)