Guard FallbackHome activity behind permission
An attacker can launch FallbackHome of the Settings app
to reset unlock time. This would prevent the device from
sleeping because it runs the following code:
PowerManager#userActivity().
However, running PowerManager.userActivity() requires
android.permission.DEVICE_POWER or android.permission.USER_ACTIVITY.
So, let's add a permission to guard this activity.
Test: Rebuilt a rom and see no side effect.
Bug: 246543238
Change-Id: I23a1e352f76cbec3e8c07a1b58b94615f2779121
(cherry picked from commit f5062c2df8
)
This commit is contained in:
@@ -2943,6 +2943,7 @@
|
|||||||
android:taskAffinity="com.android.settings.FallbackHome"
|
android:taskAffinity="com.android.settings.FallbackHome"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:theme="@style/FallbackHome"
|
android:theme="@style/FallbackHome"
|
||||||
|
android:permission="android.permission.DEVICE_POWER"
|
||||||
android:configChanges="keyboardHidden">
|
android:configChanges="keyboardHidden">
|
||||||
<intent-filter android:priority="-1000">
|
<intent-filter android:priority="-1000">
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
Reference in New Issue
Block a user