mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-20 01:39:07 +02:00
Android: Make location an optional feature
The location permissions imply android.hardware.location as required, on top of the .gps and .network subfeatures we already marked optional. Also skip the permission prompt on devices without location hardware. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f572831d37
commit
363fe679c2
2 files changed
+5
No files matched your search
@@ -12,6 +12,7 @@
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
|
||||
<uses-feature android:name="android.software.leanback" android:required="false" />
|
||||
<uses-feature android:name="android.hardware.gamepad" android:required="false" />
|
||||
<uses-feature android:name="android.hardware.location" android:required="false" />
|
||||
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
|
||||
<uses-feature android:name="android.hardware.location.network" android:required="false" />
|
||||
<uses-feature android:name="android.hardware.camera" android:required="false" />
|
||||
|
||||
@@ -1833,6 +1833,10 @@ public class PpssppActivity extends AppCompatActivity implements SensorEventList
|
||||
return true;
|
||||
} else if (command.equals("gps_command")) {
|
||||
if (params.equals("open")) {
|
||||
if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_LOCATION)) {
|
||||
Log.i(TAG, "No location hardware, not starting location updates");
|
||||
return true;
|
||||
}
|
||||
if (!askForPermissions(permissionsForLocation, REQUEST_CODE_LOCATION_PERMISSION)) {
|
||||
mLocationHelper.startLocationUpdates();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user