Update "Allow access" texts and variables

Change notification permission to dangerous
Sort entries in keys.xml alphabetically
This commit is contained in:
Jimmy Shih
2011-10-10 12:10:12 -07:00
parent 9156735aa0
commit da7bd0f4ea
7 changed files with 44 additions and 39 deletions
+1 -1
View File
@@ -233,7 +233,7 @@ limitations under the License.
android:permissionGroup="android.permission-group.LOCATION"
android:label="@string/notification_permission_label"
android:description="@string/notification_permission_description"
android:protectionLevel="normal" />
android:protectionLevel="dangerous" />
<!-- Permission to read raw track data (points, etc.) -->
<permission android:name="com.google.android.apps.mytracks.READ_TRACK_DATA"
android:permissionGroup="android.permission-group.LOCATION"
+19 -15
View File
@@ -15,7 +15,8 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<!-- Keys for application preferences - DO NOT TRANSLATE -->
<!-- Keys for application preferences. Sorted alphabetically. - DO NOT TRANSLATE -->
<string name="allow_access_key">allowAccess</string>
<string name="announcement_frequency_key">announcementFrequency</string>
<string name="ant_heart_rate_sensor_id_key">antHeartRateSensorId</string>
<string name="ant_power_sensor_id_key">antPowerSensorId</string>
@@ -35,31 +36,34 @@ limitations under the License.
<string name="report_speed_key">reportSpeed</string>
<string name="send_stats_and_points_key">sendStatsAndPoints</string>
<string name="send_to_docs_key">sendToDocs</string>
<string name="send_to_my_maps_key">sendToMyMaps</string>
<string name="send_to_fusion_tables_key">sendToFusionTables</string>
<string name="send_to_my_maps_key">sendToMyMaps</string>
<string name="sensor_type_key">sensorType</string>
<string name="share_data_key">shareData</string>
<string name="share_url_only_key">shareUrlOnly</string>
<string name="split_frequency_key">splitFrequency</string>
<string name="timestamp_track_name_key">timestampTrackName</string>
<string name="track_color_mode_key">trackColorMode</string>
<string name="track_color_mode_fixed_speed_slow_key">trackColorModeFixedSlow</string>
<string name="track_color_mode_dynamic_speed_variation_key">trackColorModeDynamicVariation
</string>
<string name="track_color_mode_fixed_speed_medium_display_key">trackColorModeFixedMediumDisplay
</string>
<string name="track_color_mode_fixed_speed_medium_key">trackColorModeFixedMedium</string>
<string name="track_color_mode_fixed_speed_slow_display_key">trackColorModeFixedSlowDisplay</string>
<string name="track_color_mode_fixed_speed_medium_display_key">trackColorModeFixedMediumDisplay</string>
<string name="track_color_mode_dynamic_speed_variation_key">trackColorModeDynamicVariation</string>
<!-- Preference keys which keep transient state (not user preferences) - DO NOT TRANSLATE -->
<string name="track_color_mode_fixed_speed_slow_display_key">trackColorModeFixedSlowDisplay
</string>
<string name="track_color_mode_fixed_speed_slow_key">trackColorModeFixedSlow</string>
<string name="track_color_mode_key">trackColorMode</string>
<!-- Preference keys which keep transient state (not user preferences). Sorted alphabetically.
- DO NOT TRANSLATE -->
<string name="auto_resume_track_current_retry_key">autoResumeTrackCurrentRetry</string>
<string name="recording_track_key">recordingTrack</string>
<string name="selected_track_key">selectedTrack</string>
<!-- Keys for non-persisted preferences - DO NOT TRANSLATE -->
<string name="backup_to_sd_key">backupToSd</string>
<string name="restore_from_sd_key">restoreFromSd</string>
<string name="reset_key">resetToDefaults</string>
<string name="sensor_options_key">sensorOptions</string>
<!-- Keys for non-persisted preferences. Sorted alphabetically. - DO NOT TRANSLATE -->
<string name="ant_options_key">antOptions</string>
<string name="backup_to_sd_key">backupToSd</string>
<string name="display_settings_screen_key">displaySettingsScreen</string>
<string name="reset_key">resetToDefaults</string>
<string name="restore_from_sd_key">restoreFromSd</string>
<string name="sensor_options_key">sensorOptions</string>
<string name="track_color_mode_fixed_speed_options_key">trackColorModeFixedOptions</string>
</resources>
+9 -8
View File
@@ -208,6 +208,15 @@ limitations under the License.
<string name="settings_not_available_summary">Not available in your version of Android</string>
<string name="settings_not_while_recording">Not available while recording a track</string>
<string name="settings_allow_access">Allow access</string>
<string name="settings_allow_access_summary_on">Other apps can read, write, start/stop recording
MyTracks data.</string>
<string name="settings_allow_access_summary_off">Other apps cannot read, write, start/stop
recording MyTracks data.</string>
<string name="settings_allow_access_dialog_message">Are you sure you want to allow other apps,
including future apps, to control and access MyTracks data? There will be no further
notification.</string>
<string name="settings_announcement_frequency">Announcement frequency</string>
<string name="settings_announcement_frequency_summary">Minimum time between two voice announcements</string>
@@ -235,14 +244,6 @@ limitations under the License.
<string name="settings_report_speed_or_pace_summary_on">Speed will be displayed</string>
<string name="settings_report_speed_or_pace_summary_off">Pace will be displayed</string>
<string name="settings_share_data">Share data</string>
<string name="settings_share_data_summary_on">Other installed apps will be able to read and write
MyTracks data, including starting/stopping a recording.</string>
<string name="settings_share_data_summary_off">MyTracks data is not shared with any installed app.
</string>
<string name="settings_share_data_dialog_message">Are you sure? This will allow any app installed
on your phone control and access to MyTracks.</string>
<string name="settings_share_url_only">Share only URL</string>
<string name="settings_share_url_only_summary_on">Only the URL of the map will be sent when sharing</string>
<string name="settings_share_url_only_summary_off">The contents of the track will also be included when sharing</string>
+4 -4
View File
@@ -211,10 +211,10 @@ limitations under the License.
android:defaultValue="false" />
<CheckBoxPreference
android:key="@string/share_data_key"
android:title="@string/settings_share_data"
android:summaryOn="@string/settings_share_data_summary_on"
android:summaryOff="@string/settings_share_data_summary_off"
android:key="@string/allow_access_key"
android:title="@string/settings_allow_access"
android:summaryOn="@string/settings_allow_access_summary_on"
android:summaryOff="@string/settings_allow_access_summary_off"
android:defaultValue="false" />
</PreferenceScreen>
@@ -143,21 +143,21 @@ public class SettingsActivity extends PreferenceActivity {
}
});
// Add a confirmation dialog for the share data preference.
final CheckBoxPreference shareDataPreference = (CheckBoxPreference) findPreference(
getString(R.string.share_data_key));
shareDataPreference.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
// Add a confirmation dialog for the "Allow access" preference.
final CheckBoxPreference allowAccessPreference = (CheckBoxPreference) findPreference(
getString(R.string.allow_access_key));
allowAccessPreference.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
if ((Boolean) newValue) {
AlertDialog dialog = new AlertDialog.Builder(SettingsActivity.this)
.setCancelable(true)
.setTitle(getString(R.string.settings_share_data))
.setMessage(getString(R.string.settings_share_data_dialog_message))
.setTitle(getString(R.string.settings_allow_access))
.setMessage(getString(R.string.settings_allow_access_dialog_message))
.setPositiveButton(android.R.string.ok, new OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int button) {
shareDataPreference.setChecked(true);
allowAccessPreference.setChecked(true);
}
})
.setNegativeButton(android.R.string.cancel, null)
@@ -194,7 +194,7 @@ public class MyTracksProvider extends ContentProvider {
Context context = getContext();
SharedPreferences sharedPreferences = context.getSharedPreferences(
Constants.SETTINGS_NAME, 0);
return sharedPreferences.getBoolean(context.getString(R.string.share_data_key), false);
return sharedPreferences.getBoolean(context.getString(R.string.allow_access_key), false);
}
}
@@ -1036,7 +1036,7 @@ public class TrackRecordingService extends Service {
sendBroadcast(broadcastIntent, getString(R.string.mytracks_notifications_permission));
SharedPreferences sharedPreferences = getSharedPreferences(Constants.SETTINGS_NAME, 0);
if (sharedPreferences.getBoolean(getString(R.string.share_data_key), false)) {
if (sharedPreferences.getBoolean(getString(R.string.allow_access_key), false)) {
sendBroadcast(broadcastIntent, getString(R.string.broadcast_notifications_permission));
}
}
@@ -1182,7 +1182,7 @@ public class TrackRecordingService extends Service {
/**
* Returns true if the RPC caller is from the same application or if the
* sharing setting indicates that another app can invoke this service's
* "Allow access" setting indicates that another app can invoke this service's
* RPCs.
*/
private boolean canAccess() {
@@ -1195,7 +1195,7 @@ public class TrackRecordingService extends Service {
} else {
SharedPreferences sharedPreferences = service.getSharedPreferences(
Constants.SETTINGS_NAME, 0);
return sharedPreferences.getBoolean(service.getString(R.string.share_data_key), false);
return sharedPreferences.getBoolean(service.getString(R.string.allow_access_key), false);
}
}