Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
BlissLauncher
Commits
88bead5f
Commit
88bead5f
authored
Jun 27, 2022
by
Suphon Thanakornpakapong
Browse files
Use fine location for weather
parent
53e4b09f
Pipeline
#199793
passed with stage
in 2 minutes and 57 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/src/apiOreo/java/foundation/e/blisslauncher/features/weather/WeatherPreferences.java
View file @
88bead5f
...
...
@@ -201,7 +201,7 @@ public class WeatherPreferences extends PreferenceActivity implements
}
public
static
boolean
hasLocationPermission
(
Context
context
)
{
return
context
.
checkSelfPermission
(
Manifest
.
permission
.
ACCESS_
COARS
E_LOCATION
)
return
context
.
checkSelfPermission
(
Manifest
.
permission
.
ACCESS_
FIN
E_LOCATION
)
==
PackageManager
.
PERMISSION_GRANTED
;
}
...
...
@@ -218,7 +218,7 @@ public class WeatherPreferences extends PreferenceActivity implements
mCustomWeatherLoc
.
setSummary
(
location
);
}
else
{
if
(!
hasLocationPermission
(
mContext
))
{
String
[]
permissions
=
new
String
[]{
Manifest
.
permission
.
ACCESS_
COARS
E_LOCATION
};
String
[]
permissions
=
new
String
[]{
Manifest
.
permission
.
ACCESS_
FIN
E_LOCATION
};
requestPermissions
(
permissions
,
LOCATION_PERMISSION_REQUEST_CODE
);
}
mCustomWeatherLoc
.
setSummary
(
R
.
string
.
weather_geolocated
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment