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_DeskClock
Commits
1222f019
Commit
1222f019
authored
10 years ago
by
Annie Chin
Browse files
Options
Download
Email Patches
Plain Diff
Remove KEY_ALARM_IN_SILENT_MODE code.
Bug: 18415395 Change-Id: I1fde49d8e0de9b6026e3572f2bedef880e84bacc
parent
a8ae565c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
33 deletions
+0
-33
src/com/android/deskclock/SettingsActivity.java
src/com/android/deskclock/SettingsActivity.java
+0
-33
No files found.
src/com/android/deskclock/SettingsActivity.java
View file @
1222f019
...
...
@@ -25,8 +25,6 @@ import android.preference.CheckBoxPreference;
import
android.preference.ListPreference
;
import
android.preference.Preference
;
import
android.preference.PreferenceActivity
;
import
android.preference.PreferenceScreen
;
import
android.provider.Settings
;
import
android.text.format.DateUtils
;
import
android.view.Menu
;
import
android.view.MenuItem
;
...
...
@@ -44,11 +42,6 @@ import java.util.TimeZone;
public
class
SettingsActivity
extends
PreferenceActivity
implements
Preference
.
OnPreferenceChangeListener
{
private
static
final
int
ALARM_STREAM_TYPE_BIT
=
1
<<
AudioManager
.
STREAM_ALARM
;
public
static
final
String
KEY_ALARM_IN_SILENT_MODE
=
"alarm_in_silent_mode"
;
public
static
final
String
KEY_ALARM_SNOOZE
=
"snooze_duration"
;
public
static
final
String
KEY_VOLUME_BEHAVIOR
=
...
...
@@ -119,7 +112,6 @@ public class SettingsActivity extends PreferenceActivity
return
super
.
onOptionsItemSelected
(
item
);
}
@Override
public
boolean
onCreateOptionsMenu
(
Menu
menu
)
{
getMenuInflater
().
inflate
(
R
.
menu
.
settings_menu
,
menu
);
...
...
@@ -130,31 +122,6 @@ public class SettingsActivity extends PreferenceActivity
return
super
.
onCreateOptionsMenu
(
menu
);
}
@Override
public
boolean
onPreferenceTreeClick
(
PreferenceScreen
preferenceScreen
,
Preference
preference
)
{
if
(
KEY_ALARM_IN_SILENT_MODE
.
equals
(
preference
.
getKey
()))
{
CheckBoxPreference
pref
=
(
CheckBoxPreference
)
preference
;
int
ringerModeStreamTypes
=
Settings
.
System
.
getInt
(
getContentResolver
(),
Settings
.
System
.
MODE_RINGER_STREAMS_AFFECTED
,
0
);
if
(
pref
.
isChecked
())
{
ringerModeStreamTypes
&=
~
ALARM_STREAM_TYPE_BIT
;
}
else
{
ringerModeStreamTypes
|=
ALARM_STREAM_TYPE_BIT
;
}
Settings
.
System
.
putInt
(
getContentResolver
(),
Settings
.
System
.
MODE_RINGER_STREAMS_AFFECTED
,
ringerModeStreamTypes
);
return
true
;
}
return
super
.
onPreferenceTreeClick
(
preferenceScreen
,
preference
);
}
@Override
public
boolean
onPreferenceChange
(
Preference
pref
,
Object
newValue
)
{
if
(
KEY_AUTO_SILENCE
.
equals
(
pref
.
getKey
()))
{
...
...
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