[Safer intents] System
To avoid implicit intents, make intents launch explicitly. Bug: 323061508 Test: build Change-Id: Iaf5466f3acd3293e738f450e0117e180b93d4e1c
This commit is contained in:
@@ -152,7 +152,8 @@
|
|||||||
<Preference
|
<Preference
|
||||||
android:key="demo_mode"
|
android:key="demo_mode"
|
||||||
android:title="@string/demo_mode">
|
android:title="@string/demo_mode">
|
||||||
<intent android:action="com.android.settings.action.DEMO_MODE" />
|
<intent android:action="com.android.settings.action.DEMO_MODE"
|
||||||
|
android:targetPackage="com.android.systemui"/>
|
||||||
</Preference>
|
</Preference>
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ public class GraphicsDriverEnableAngleAsSystemDriverController
|
|||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
void rebootDevice(Context context) {
|
void rebootDevice(Context context) {
|
||||||
final Intent intent = new Intent(Intent.ACTION_REBOOT);
|
final Intent intent = new Intent(Intent.ACTION_REBOOT).setPackage("android");
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -173,7 +173,8 @@ public class SystemNavigationGestureSettings extends RadioButtonPickerFragment i
|
|||||||
|
|
||||||
if (KEY_SYSTEM_NAV_GESTURAL.equals(info.getKey())) {
|
if (KEY_SYSTEM_NAV_GESTURAL.equals(info.getKey())) {
|
||||||
pref.setExtraWidgetOnClickListener((v) -> startActivity(new Intent(
|
pref.setExtraWidgetOnClickListener((v) -> startActivity(new Intent(
|
||||||
GestureNavigationSettingsFragment.GESTURE_NAVIGATION_SETTINGS)));
|
GestureNavigationSettingsFragment.GESTURE_NAVIGATION_SETTINGS)
|
||||||
|
.setPackage(getContext().getPackageName())));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (KEY_SYSTEM_NAV_2BUTTONS.equals(info.getKey()) || KEY_SYSTEM_NAV_3BUTTONS.equals(
|
if (KEY_SYSTEM_NAV_2BUTTONS.equals(info.getKey()) || KEY_SYSTEM_NAV_3BUTTONS.equals(
|
||||||
|
|||||||
Reference in New Issue
Block a user