Skip to content

Commit 93b1787

Browse files
jsharkeyAndroid Git Automerger
authored andcommitted
am 5831159: Merge "More migration to Global settings." into jb-mr1-dev
* commit '5831159b8d4cf85fa46e2c4cb8e7d9f750014d6f': More migration to Global settings.
2 parents fba021e + 5831159 commit 93b1787

File tree

5 files changed

+24
-23
lines changed

5 files changed

+24
-23
lines changed

media/java/android/media/AudioService.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,8 @@ private void readPersistedSettings() {
634634
final ContentResolver cr = mContentResolver;
635635

636636
int ringerModeFromSettings =
637-
Settings.Global.getInt(cr, System.MODE_RINGER, AudioManager.RINGER_MODE_NORMAL);
637+
Settings.Global.getInt(
638+
cr, Settings.Global.MODE_RINGER, AudioManager.RINGER_MODE_NORMAL);
638639
int ringerMode = ringerModeFromSettings;
639640
// sanity check in case the settings are restored from a device with incompatible
640641
// ringer modes
@@ -645,7 +646,7 @@ private void readPersistedSettings() {
645646
ringerMode = AudioManager.RINGER_MODE_SILENT;
646647
}
647648
if (ringerMode != ringerModeFromSettings) {
648-
Settings.Global.putInt(cr, System.MODE_RINGER, ringerMode);
649+
Settings.Global.putInt(cr, Settings.Global.MODE_RINGER, ringerMode);
649650
}
650651
synchronized(mSettingsLock) {
651652
mRingerMode = ringerMode;
@@ -3118,7 +3119,7 @@ private void persistVolume(VolumeStreamState streamState,
31183119
}
31193120

31203121
private void persistRingerMode(int ringerMode) {
3121-
Settings.Global.putInt(mContentResolver, System.MODE_RINGER, ringerMode);
3122+
Settings.Global.putInt(mContentResolver, Settings.Global.MODE_RINGER, ringerMode);
31223123
}
31233124

31243125
private void playSoundEffect(int effectType, int volume) {

packages/SystemUI/src/com/android/systemui/BootReceiver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void onReceive(final Context context, Intent intent) {
3535
try {
3636
// Start the load average overlay, if activated
3737
ContentResolver res = context.getContentResolver();
38-
if (Settings.System.getInt(res, Settings.System.SHOW_PROCESSES, 0) != 0) {
38+
if (Settings.Global.getInt(res, Settings.Global.SHOW_PROCESSES, 0) != 0) {
3939
Intent loadavg = new Intent(context, com.android.systemui.LoadAverageService.class);
4040
context.startService(loadavg);
4141
}

packages/SystemUI/src/com/android/systemui/power/PowerUI.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ void playLowBatterySound() {
237237
}
238238

239239
final ContentResolver cr = mContext.getContentResolver();
240-
if (Settings.System.getInt(cr, Settings.System.POWER_SOUNDS_ENABLED, 1) == 1) {
241-
final String soundPath = Settings.System.getString(cr,
242-
Settings.System.LOW_BATTERY_SOUND);
240+
if (Settings.Global.getInt(cr, Settings.Global.POWER_SOUNDS_ENABLED, 1) == 1) {
241+
final String soundPath = Settings.Global.getString(cr,
242+
Settings.Global.LOW_BATTERY_SOUND);
243243
if (soundPath != null) {
244244
final Uri soundUri = Uri.parse("file://" + soundPath);
245245
if (soundUri != null) {

policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,15 +1912,15 @@ public long interceptKeyBeforeDispatching(WindowState win, KeyEvent event, int p
19121912
Intent service = new Intent();
19131913
service.setClassName(mContext, "com.android.server.LoadAverageService");
19141914
ContentResolver res = mContext.getContentResolver();
1915-
boolean shown = Settings.System.getInt(
1916-
res, Settings.System.SHOW_PROCESSES, 0) != 0;
1915+
boolean shown = Settings.Global.getInt(
1916+
res, Settings.Global.SHOW_PROCESSES, 0) != 0;
19171917
if (!shown) {
19181918
mContext.startService(service);
19191919
} else {
19201920
mContext.stopService(service);
19211921
}
1922-
Settings.System.putInt(
1923-
res, Settings.System.SHOW_PROCESSES, shown ? 0 : 1);
1922+
Settings.Global.putInt(
1923+
res, Settings.Global.SHOW_PROCESSES, shown ? 0 : 1);
19241924
return -1;
19251925
}
19261926
}

services/java/com/android/server/am/ActivityManagerService.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7251,11 +7251,11 @@ public void setDebugApp(String packageName, boolean waitForDebugger,
72517251
// care about.
72527252
if (persistent) {
72537253
final ContentResolver resolver = mContext.getContentResolver();
7254-
Settings.System.putString(
7255-
resolver, Settings.System.DEBUG_APP,
7254+
Settings.Global.putString(
7255+
resolver, Settings.Global.DEBUG_APP,
72567256
packageName);
7257-
Settings.System.putInt(
7258-
resolver, Settings.System.WAIT_FOR_DEBUGGER,
7257+
Settings.Global.putInt(
7258+
resolver, Settings.Global.WAIT_FOR_DEBUGGER,
72597259
waitForDebugger ? 1 : 0);
72607260
}
72617261

@@ -7317,9 +7317,9 @@ public void setAlwaysFinish(boolean enabled) {
73177317
enforceCallingPermission(android.Manifest.permission.SET_ALWAYS_FINISH,
73187318
"setAlwaysFinish()");
73197319

7320-
Settings.System.putInt(
7320+
Settings.Global.putInt(
73217321
mContext.getContentResolver(),
7322-
Settings.System.ALWAYS_FINISH_ACTIVITIES, enabled ? 1 : 0);
7322+
Settings.Global.ALWAYS_FINISH_ACTIVITIES, enabled ? 1 : 0);
73237323

73247324
synchronized (this) {
73257325
mAlwaysFinishActivities = enabled;
@@ -7596,12 +7596,12 @@ public final void startRunning(String pkg, String cls, String action,
75967596

75977597
private void retrieveSettings() {
75987598
final ContentResolver resolver = mContext.getContentResolver();
7599-
String debugApp = Settings.System.getString(
7600-
resolver, Settings.System.DEBUG_APP);
7601-
boolean waitForDebugger = Settings.System.getInt(
7602-
resolver, Settings.System.WAIT_FOR_DEBUGGER, 0) != 0;
7603-
boolean alwaysFinishActivities = Settings.System.getInt(
7604-
resolver, Settings.System.ALWAYS_FINISH_ACTIVITIES, 0) != 0;
7599+
String debugApp = Settings.Global.getString(
7600+
resolver, Settings.Global.DEBUG_APP);
7601+
boolean waitForDebugger = Settings.Global.getInt(
7602+
resolver, Settings.Global.WAIT_FOR_DEBUGGER, 0) != 0;
7603+
boolean alwaysFinishActivities = Settings.Global.getInt(
7604+
resolver, Settings.Global.ALWAYS_FINISH_ACTIVITIES, 0) != 0;
76057605

76067606
Configuration configuration = new Configuration();
76077607
Settings.System.getConfiguration(resolver, configuration);

0 commit comments

Comments
 (0)