Merge "Remove references to persist.sys.language/country."

This commit is contained in:
Narayan Kamath
2015-02-12 16:31:07 +00:00
committed by Gerrit Code Review
3 changed files with 4 additions and 20 deletions

View File

@@ -433,8 +433,8 @@ application, however, should localize properly.</p>
<p>To change the locale in the emulator by using the adb shell. </p> <p>To change the locale in the emulator by using the adb shell. </p>
<ol> <ol>
<li>Pick the locale you want to test and determine its language and region codes, for <li>Pick the locale you want to test and determine its BCP-47 language tag, for
example <code>fr</code> for French and <code>CA</code> for Canada.<br> example, Canadian French would be <code>fr-CA</code>.<br>
</li> </li>
<li>Launch an emulator.</li> <li>Launch an emulator.</li>
<li>From a command-line shell on the host computer, run the following <li>From a command-line shell on the host computer, run the following
@@ -444,16 +444,14 @@ command:<br>
the <code>-e</code> option:<br> the <code>-e</code> option:<br>
<code>adb -e shell</code></li> <code>adb -e shell</code></li>
<li>At the adb shell prompt (<code>#</code>), run this command: <br> <li>At the adb shell prompt (<code>#</code>), run this command: <br>
<code>setprop persist.sys.language [<em>language code</em>];setprop <code>setprop persist.sys.locale [<em>BCP-47 language tag</em>];stop;sleep 5;start <br>
persist.sys.country [<em>country code</em>];stop;sleep 5;start <br>
</code>Replace bracketed sections with the appropriate codes from Step </code>Replace bracketed sections with the appropriate codes from Step
1.</li> 1.</li>
</ol> </ol>
<p>For instance, to test in Canadian French:</p> <p>For instance, to test in Canadian French:</p>
<p><code>setprop persist.sys.language fr;setprop persist.sys.country <p><code>setprop persist.sys.locale fr-CA;stop;sleep 5;start </code></p>
CA;stop;sleep 5;start </code></p>
<p>This will cause the emulator to restart. (It will look like a full reboot, <p>This will cause the emulator to restart. (It will look like a full reboot,
but it is not.) Once the Home screen appears again, re-launch your application (for but it is not.) Once the Home screen appears again, re-launch your application (for

View File

@@ -860,11 +860,6 @@ class MountService extends IMountService.Stub
// Temporary workaround for http://b/17945169. // Temporary workaround for http://b/17945169.
Slog.d(TAG, "Setting system properties to " + systemLocale + " from mount service"); Slog.d(TAG, "Setting system properties to " + systemLocale + " from mount service");
SystemProperties.set("persist.sys.locale", locale.toLanguageTag()); SystemProperties.set("persist.sys.locale", locale.toLanguageTag());
// TODO: Stop setting these properties once we've removed all
// references to them.
SystemProperties.set("persist.sys.language", locale.getLanguage());
SystemProperties.set("persist.sys.country", locale.getCountry());
} }
/** /**

View File

@@ -16420,15 +16420,6 @@ public final class ActivityManagerService extends ActivityManagerNative
if (isPersist) { if (isPersist) {
SystemProperties.set("persist.sys.locale", languageTag); SystemProperties.set("persist.sys.locale", languageTag);
// These values are *deprecated*, use persist.sys.locale instead.
//
// TODO: Stop setting these values once all code that references
// them has been removed.
SystemProperties.set("persist.sys.language", l.getLanguage());
SystemProperties.set("persist.sys.country", l.getCountry());
SystemProperties.set("persist.sys.localevar", l.getVariant());
mHandler.sendMessage(mHandler.obtainMessage(SEND_LOCALE_TO_MOUNT_DAEMON_MSG, l)); mHandler.sendMessage(mHandler.obtainMessage(SEND_LOCALE_TO_MOUNT_DAEMON_MSG, l));
} }
} }