From 15d5047209ab3cc109d8b924e75d4e59d601c91d Mon Sep 17 00:00:00 2001 From: Lifu Tang Date: Thu, 14 Mar 2019 13:09:09 -0700 Subject: [PATCH 1/3] Add comment to help translator with plural forms Test: build and flash Change-Id: I79522aab32db60fd244991191a2e3bac03fb3ee0 --- res/values/strings.xml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index b912c9d87bf..2da9f9a2822 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -3756,13 +3756,25 @@ App permission Location is off - + %1$d of %2$d - app has unlimited access + apps has unlimited access %1$d of From ecea9e96d97d4f96ef57dd98f9e722cd25cb720e Mon Sep 17 00:00:00 2001 From: Lifu Tang Date: Fri, 15 Mar 2019 11:40:44 -0700 Subject: [PATCH 2/3] Display empty message if no recent location access Bug: 120873123 Test: build, flash, and test manually Change-Id: Ibd7a47cb814fe16ecb1c017865ab28862e17ddcc --- res/values/strings.xml | 6 +++++- .../location/RecentLocationAccessPreferenceController.java | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 2da9f9a2822..3c036044e47 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -3785,8 +3785,12 @@ Recent location access View details - + No apps have requested location recently + + No apps recently accessed location High battery use diff --git a/src/com/android/settings/location/RecentLocationAccessPreferenceController.java b/src/com/android/settings/location/RecentLocationAccessPreferenceController.java index 44d600e6241..fd1ef639e52 100644 --- a/src/com/android/settings/location/RecentLocationAccessPreferenceController.java +++ b/src/com/android/settings/location/RecentLocationAccessPreferenceController.java @@ -74,6 +74,7 @@ public class RecentLocationAccessPreferenceController extends AbstractPreference mController = AppEntitiesHeaderController.newInstance(mContext, view) .setHeaderTitleRes(R.string.location_category_recent_location_access) .setHeaderDetailsRes(R.string.location_recent_location_access_view_details) + .setHeaderEmptyRes(R.string.location_no_recent_accesses) .setHeaderDetailsClickListener((View v) -> { final Intent intent = new Intent(Intent.ACTION_REVIEW_PERMISSION_USAGE); intent.putExtra(Intent.EXTRA_PERMISSION_NAME, @@ -106,8 +107,6 @@ public class RecentLocationAccessPreferenceController extends AbstractPreference for (; i < MAXIMUM_APP_COUNT; i++) { mController.removeAppEntity(i); } - } else { - // If there's no item to display, add a "No recent apps" item. } mController.apply(); } From 754ce92037fad14a046fd443b5b6b8c31a301c73 Mon Sep 17 00:00:00 2001 From: Lifu Tang Date: Fri, 15 Mar 2019 12:22:13 -0700 Subject: [PATCH 3/3] Update strings for scanning settings Bug: 128323721 Test: build, flash, and test manually Change-Id: I85ca2b69e61bdc839b9df1010c74d945990d5549 --- res/values/strings.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 3c036044e47..b943afefa68 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -3024,14 +3024,14 @@ PRL version MEID (sim slot %1$d) - - Both Wi\u2011Fi and Bluetooth are allowed to determine location - - Only Wi\u2011Fi is allowed to determine location - - Only Bluetooth is allowed to determine location - - Neither Wi\u2011Fi nor Bluetooth is allowed to determine location + + Both Wi\u2011Fi and Bluetooth scanning are on + + Wi\u2011Fi scanning is on, Bluetooth scanning is off + + Bluetooth scanning is on, Wi\u2011Fi scanning is off + + Both Wi\u2011Fi and Bluetooth scanning are off MEID