Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
824568a6
Commit
824568a6
authored
Jun 13, 2019
by
Lee Jaebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
設定の位置情報取得方法の変更
parent
438b3dad
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/util/LocationManagerUtil.java
+6
-4
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVCheckContentViewActivity.java
+1
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/PairingSettingActivity.java
+1
-1
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/cl/util/LocationManagerUtil.java
View file @
824568a6
...
@@ -70,9 +70,10 @@ public class LocationManagerUtil {
...
@@ -70,9 +70,10 @@ public class LocationManagerUtil {
final
boolean
network
=
locationManager
.
isProviderEnabled
(
LocationManager
.
NETWORK_PROVIDER
);
final
boolean
network
=
locationManager
.
isProviderEnabled
(
LocationManager
.
NETWORK_PROVIDER
);
// GPSの状態を取得(getSystemtServiceからのGPS ON/OFF取得が取れない場合があるため、secureで取得したgpsも判定するため)
// GPSの状態を取得(getSystemtServiceからのGPS ON/OFF取得が取れない場合があるため、secureで取得したgpsも判定するため)
final
boolean
secureLocationGpsEnabled
=
android
.
provider
.
Settings
.
Secure
.
getString
(
context
.
getContentResolver
(),
Settings
.
Secure
.
LOCATION_PROVIDERS_ALLOWED
).
indexOf
(
"gps"
,
0
)
>=
0
;
final
boolean
secureLocationGpsEnabled
=
android
.
provider
.
Settings
.
Secure
.
getString
(
context
.
getContentResolver
(),
Settings
.
Secure
.
LOCATION_PROVIDERS_ALLOWED
).
contains
(
"gps"
);
final
boolean
secureLocationNetWorkEnabled
=
android
.
provider
.
Settings
.
Secure
.
getString
(
context
.
getContentResolver
(),
Settings
.
Secure
.
LOCATION_PROVIDERS_ALLOWED
).
contains
(
"network"
);
if
(!(
gps
||
network
)
||
!(
secureLocationGpsEnabled
||
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
()
))
{
if
(!(
gps
||
network
)
||
!(
secureLocationGpsEnabled
||
secureLocationNetWorkEnabled
))
{
// この時点で位置情報サービスが有効でない場合は何もしない。
// この時点で位置情報サービスが有効でない場合は何もしない。
setLocationFailed
();
setLocationFailed
();
return
;
return
;
...
@@ -241,9 +242,10 @@ public class LocationManagerUtil {
...
@@ -241,9 +242,10 @@ public class LocationManagerUtil {
final
boolean
network
=
locationManager
.
isProviderEnabled
(
LocationManager
.
NETWORK_PROVIDER
);
final
boolean
network
=
locationManager
.
isProviderEnabled
(
LocationManager
.
NETWORK_PROVIDER
);
// GPSの状態を取得(getSystemtServiceからのGPS ON/OFF取得が取れない場合があるため、secureで取得したgpsも判定するため)
// GPSの状態を取得(getSystemtServiceからのGPS ON/OFF取得が取れない場合があるため、secureで取得したgpsも判定するため)
final
boolean
secureLocationGpsEnabled
=
android
.
provider
.
Settings
.
Secure
.
getString
(
context
.
getContentResolver
(),
Settings
.
Secure
.
LOCATION_PROVIDERS_ALLOWED
).
indexOf
(
"gps"
,
0
)
>=
0
;
final
boolean
secureLocationGpsEnabled
=
android
.
provider
.
Settings
.
Secure
.
getString
(
context
.
getContentResolver
(),
Settings
.
Secure
.
LOCATION_PROVIDERS_ALLOWED
).
contains
(
"gps"
);
final
boolean
secureLocationNetWorkEnabled
=
android
.
provider
.
Settings
.
Secure
.
getString
(
context
.
getContentResolver
(),
Settings
.
Secure
.
LOCATION_PROVIDERS_ALLOWED
).
contains
(
"network"
);
if
(!(
gps
||
network
)
||
!(
secureLocationGpsEnabled
||
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
()
))
{
if
(!(
gps
||
network
)
||
!(
secureLocationGpsEnabled
||
secureLocationNetWorkEnabled
))
{
ABVUIDataCache
appDataCache
=
ABVApplication
.
getABVUIDataCache
(
context
);
ABVUIDataCache
appDataCache
=
ABVApplication
.
getABVUIDataCache
(
context
);
if
(
appDataCache
.
checkLocationServiceFlg
)
{
if
(
appDataCache
.
checkLocationServiceFlg
)
{
// 位置情報が有効になっていない場合は、Google Maps アプリライクなダイアログを起動します。
// 位置情報が有効になっていない場合は、Google Maps アプリライクなダイアログを起動します。
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVCheckContentViewActivity.java
View file @
824568a6
...
@@ -299,7 +299,7 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
...
@@ -299,7 +299,7 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
final
boolean
gpsEnabled
=
lm
.
isProviderEnabled
(
LocationManager
.
GPS_PROVIDER
);
final
boolean
gpsEnabled
=
lm
.
isProviderEnabled
(
LocationManager
.
GPS_PROVIDER
);
// GPSの状態を取得(getSystemtServiceからのGPS ON/OFF取得が取れない場合があるため、secureで取得したgpsも判定するため)
// GPSの状態を取得(getSystemtServiceからのGPS ON/OFF取得が取れない場合があるため、secureで取得したgpsも判定するため)
final
boolean
secureLocationGpsEnabled
=
android
.
provider
.
Settings
.
Secure
.
getString
(
getContentResolver
(),
Settings
.
Secure
.
LOCATION_PROVIDERS_ALLOWED
).
indexOf
(
"gps"
,
0
)
>=
0
;
final
boolean
secureLocationGpsEnabled
=
android
.
provider
.
Settings
.
Secure
.
getString
(
getContentResolver
(),
Settings
.
Secure
.
LOCATION_PROVIDERS_ALLOWED
).
contains
(
"gps"
)
;
//端末側の位置情報許可チェック
//端末側の位置情報許可チェック
if
(
gpsEnabled
||
secureLocationGpsEnabled
)
{
if
(
gpsEnabled
||
secureLocationGpsEnabled
)
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/PairingSettingActivity.java
View file @
824568a6
...
@@ -213,7 +213,7 @@ public class PairingSettingActivity extends ABVUIActivity {
...
@@ -213,7 +213,7 @@ public class PairingSettingActivity extends ABVUIActivity {
final
boolean
gpsEnabled
=
lm
.
isProviderEnabled
(
LocationManager
.
GPS_PROVIDER
);
final
boolean
gpsEnabled
=
lm
.
isProviderEnabled
(
LocationManager
.
GPS_PROVIDER
);
// GPSの状態を取得(getSystemtServiceからのGPS ON/OFF取得が取れない場合があるため、secureで取得したgpsも判定するため)
// GPSの状態を取得(getSystemtServiceからのGPS ON/OFF取得が取れない場合があるため、secureで取得したgpsも判定するため)
final
boolean
secureLocationGpsEnabled
=
android
.
provider
.
Settings
.
Secure
.
getString
(
getContentResolver
(),
Settings
.
Secure
.
LOCATION_PROVIDERS_ALLOWED
).
indexOf
(
"gps"
,
0
)
>=
0
;
final
boolean
secureLocationGpsEnabled
=
android
.
provider
.
Settings
.
Secure
.
getString
(
getContentResolver
(),
Settings
.
Secure
.
LOCATION_PROVIDERS_ALLOWED
).
contains
(
"gps"
)
;
//端末側の位置情報許可チェック
//端末側の位置情報許可チェック
if
(!(
gpsEnabled
||
secureLocationGpsEnabled
))
{
if
(!(
gpsEnabled
||
secureLocationGpsEnabled
))
{
...
...
Write
Preview
Markdown
is supported
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