Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
packages_apps_Settings
Commits
648bf5fd
Commit
648bf5fd
authored
16 years ago
by
The Android Open Source Project
Browse files
Options
Download
Email Patches
Plain Diff
auto import from //branches/cupcake/...@137197
parent
86997bea
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
5 deletions
+37
-5
Android.mk
Android.mk
+1
-1
res/values/strings.xml
res/values/strings.xml
+8
-2
res/xml/sound_and_display_settings.xml
res/xml/sound_and_display_settings.xml
+6
-1
src/com/android/settings/SoundAndDisplaySettings.java
src/com/android/settings/SoundAndDisplaySettings.java
+12
-0
src/com/android/settings/bluetooth/BluetoothDiscoverableEnabler.java
...roid/settings/bluetooth/BluetoothDiscoverableEnabler.java
+4
-1
src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java
...roid/settings/bluetooth/LocalBluetoothProfileManager.java
+6
-0
No files found.
Android.mk
View file @
648bf5fd
LOCAL_PATH
:=
$(
call
my-dir
)
include
$(CLEAR_VARS)
LOCAL_MODULE_TAGS
:=
user
development
LOCAL_MODULE_TAGS
:=
user
LOCAL_SRC_FILES
:=
$(
call
all-java-files-under, src
)
...
...
This diff is collapsed.
Click to expand it.
res/values/strings.xml
View file @
648bf5fd
...
...
@@ -812,9 +812,15 @@
<!-- Sound & display settings screen, animations check box label -->
<string
name=
"animations_title"
>
Animation
</string>
<!-- Sound & display settings screen, animations option summary text when check box is selected -->
<string
name=
"animations_summary_on"
>
Show animation when opening
/
closing windows
</string>
<string
name=
"animations_summary_on"
>
Show animation when opening
&
closing windows
</string>
<!-- Sound & display settings screen, animations option summary text when check box is clear -->
<string
name=
"animations_summary_off"
>
Show animation when opening/closing windows
</string>
<string
name=
"animations_summary_off"
>
Show animation when opening
&
closing windows
</string>
<!-- Sound & display settings screen, accelerometer-based rotation check box label -->
<string
name=
"accelerometer_title"
>
Orientation
</string>
<!-- Sound & display settings screen, accelerometer-based rotation summary text when check box is selected -->
<string
name=
"accelerometer_summary_on"
>
Switch orientation automatically when rotating phone
</string>
<!-- Sound & display settings screen, accelerometer-based rotation summary text when check box is clear -->
<string
name=
"accelerometer_summary_off"
>
Switch orientation automatically when rotating phone
</string>
<!-- Sound & display settings screen, setting option name to change brightness -->
<string
name=
"brightness"
>
Brightness
</string>
<!-- Sound & display settings screen, setting option summary to change brightness -->
...
...
This diff is collapsed.
Click to expand it.
res/xml/sound_and_display_settings.xml
View file @
648bf5fd
...
...
@@ -97,13 +97,18 @@
<PreferenceCategory
android:title=
"@string/display_settings"
>
<CheckBoxPreference
android:key=
"accelerometer"
android:title=
"@string/accelerometer_title"
android:summaryOn=
"@string/accelerometer_summary_on"
android:summaryOff=
"@string/accelerometer_summary_off"
/>
<CheckBoxPreference
android:key=
"animations"
android:title=
"@string/animations_title"
android:summaryOn=
"@string/animations_summary_on"
android:summaryOff=
"@string/animations_summary_off"
/>
<com.android.settings.BrightnessPreference
android:key=
"brightness"
android:title=
"@string/brightness"
...
...
This diff is collapsed.
Click to expand it.
src/com/android/settings/SoundAndDisplaySettings.java
View file @
648bf5fd
...
...
@@ -50,6 +50,7 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements
private
static
final
String
KEY_DTMF_TONE
=
"dtmf_tone"
;
private
static
final
String
KEY_SOUND_EFFECTS
=
"sound_effects"
;
private
static
final
String
KEY_ANIMATIONS
=
"animations"
;
private
static
final
String
KEY_ACCELEROMETER
=
"accelerometer"
;
private
static
final
String
KEY_PLAY_MEDIA_NOTIFICATION_SOUNDS
=
"play_media_notification_sounds"
;
private
CheckBoxPreference
mSilent
;
...
...
@@ -69,6 +70,7 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements
private
CheckBoxPreference
mDtmfTone
;
private
CheckBoxPreference
mSoundEffects
;
private
CheckBoxPreference
mAnimations
;
private
CheckBoxPreference
mAccelerometer
;
private
float
[]
mAnimationScales
;
private
AudioManager
mAudioManager
;
...
...
@@ -108,6 +110,8 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements
Settings
.
System
.
SOUND_EFFECTS_ENABLED
,
0
)
!=
0
);
mAnimations
=
(
CheckBoxPreference
)
findPreference
(
KEY_ANIMATIONS
);
mAnimations
.
setPersistent
(
false
);
mAccelerometer
=
(
CheckBoxPreference
)
findPreference
(
KEY_ACCELEROMETER
);
mAccelerometer
.
setPersistent
(
false
);
ListPreference
screenTimeoutPreference
=
(
ListPreference
)
findPreference
(
KEY_SCREEN_TIMEOUT
);
...
...
@@ -174,6 +178,9 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements
if
(
animations
!=
mAnimations
.
isChecked
()
||
force
)
{
mAnimations
.
setChecked
(
animations
);
}
mAccelerometer
.
setChecked
(
Settings
.
System
.
getInt
(
getContentResolver
(),
Settings
.
System
.
ACCELEROMETER_ROTATION
,
0
)
!=
0
);
}
@Override
...
...
@@ -224,6 +231,11 @@ public class SoundAndDisplaySettings extends PreferenceActivity implements
mWindowManager
.
setAnimationScales
(
mAnimationScales
);
}
catch
(
RemoteException
e
)
{
}
}
else
if
(
preference
==
mAccelerometer
)
{
Settings
.
System
.
putInt
(
getContentResolver
(),
Settings
.
System
.
ACCELEROMETER_ROTATION
,
mAccelerometer
.
isChecked
()
?
1
:
0
);
}
return
true
;
}
...
...
This diff is collapsed.
Click to expand it.
src/com/android/settings/bluetooth/BluetoothDiscoverableEnabler.java
View file @
648bf5fd
...
...
@@ -127,7 +127,10 @@ public class BluetoothDiscoverableEnabler implements Preference.OnPreferenceChan
int
timeout
=
getDiscoverableTimeout
();
manager
.
setDiscoverableTimeout
(
timeout
);
mCheckBoxPreference
.
setSummaryOn
(
mContext
.
getResources
().
getString
(
R
.
string
.
bluetooth_is_discoverable
,
timeout
));
long
endTimestamp
=
System
.
currentTimeMillis
()
+
timeout
*
1000
;
persistDiscoverableEndTimestamp
(
endTimestamp
);
...
...
This diff is collapsed.
Click to expand it.
src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java
View file @
648bf5fd
...
...
@@ -132,6 +132,12 @@ public abstract class LocalBluetoothProfileManager {
@Override
public
int
connect
(
String
address
)
{
List
<
String
>
sinks
=
mService
.
listConnectedSinks
();
if
(
sinks
!=
null
)
{
for
(
String
sinkAddress
:
sinks
)
{
mService
.
disconnectSink
(
sinkAddress
);
}
}
return
mService
.
connectSink
(
address
);
}
...
...
This diff is collapsed.
Click to expand it.
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