Skip to content

Commit

Permalink
Revert "Some Halo color options"
Browse files Browse the repository at this point in the history
This reverts commit c9df211.

Conflicts:

	res/xml/user_interface_settings.xml
	src/com/android/settings/UserInterface.java
  • Loading branch information
temasek committed Jul 10, 2013
1 parent 75161ad commit 5c13830
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 91 deletions.
4 changes: 0 additions & 4 deletions res/values/cm_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -879,10 +879,6 @@
<string name="halo_state_summary">For black/white-listing notifications pinging through HALO</string>
<string name="halo_state_black">Black list</string>
<string name="halo_state_white">White list</string>
<string name="halo_color_title">HALO color</string>
<string name="halo_button_color_title">HALO button color</string>
<string name="halo_text_bubble_color_title">HALO text bubble color</string>
<string name="halo_ping_color_title">HALO ping color</string>
<string name="halo_pause_title">HALO pause active app</string>
<string name="halo_pause_summary">When opening an app with HALO the underlying app will get paused (enabled by default on low memory devices)</string>
<string name="halo_gone_title">HALO notification visibility</string>
Expand Down
22 changes: 0 additions & 22 deletions res/xml/user_interface_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,28 +106,6 @@
android:summary="@string/halo_gone_summary"
android:dependency="halo_enabled" />

<PreferenceCategory
android:key="halo_color"
android:title="@string/halo_color_title" />

<PreferenceScreen
android:key="halo_button_color"
android:title="@string/halo_button_color_title"
android:dependency="halo_enabled" />
</PreferenceScreen>

<PreferenceScreen
android:key="halo_text_bubble_color"
android:title="@string/halo_text_bubble_color_title"
android:dependency="halo_enabled" />
</PreferenceScreen>

<PreferenceScreen
android:key="halo_ping_color"
android:title="@string/halo_ping_color_title"
android:dependency="halo_enabled" />
</PreferenceScreen>

</PreferenceCategory>

</PreferenceScreen>
66 changes: 1 addition & 65 deletions src/com/android/settings/UserInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ public class UserInterface extends SettingsPreferenceFragment implements OnPrefe
private static final String KEY_HALO_REVERSED = "halo_reversed";
private static final String KEY_HALO_PAUSE = "halo_pause";
private static final String KEY_WE_WANT_POPUPS = "show_popup";
private static final String KEY_HALO_BUTTON_COLOR = "halo_button_color";
private static final String KEY_HALO_TEXT_BUBBLE_COLOR = "halo_text_bubble_color";
private static final String KEY_HALO_PING_COLOR = "halo_ping_color";
private static final String KEY_HALO_GONE = "halo_gone";

private Preference mLcdDensity;
Expand All @@ -84,9 +81,6 @@ public class UserInterface extends SettingsPreferenceFragment implements OnPrefe
private CheckBoxPreference mHaloReversed;
private CheckBoxPreference mHaloPause;
private CheckBoxPreference mWeWantPopups;
private Preference mHaloButtonColor;
private Preference mHaloTextBubbleColor;
private Preference mHaloPingColor;
private CheckBoxPreference mHaloGone;

private boolean mIsCrtOffChecked = false;
Expand Down Expand Up @@ -143,13 +137,6 @@ public void onCreate(Bundle savedInstanceState) {
mWeWantPopups.setOnPreferenceChangeListener(this);
mWeWantPopups.setChecked(showPopups > 0);

mHaloButtonColor =
(Preference) prefSet.findPreference(KEY_HALO_BUTTON_COLOR);
mHaloTextBubbleColor =
(Preference) prefSet.findPreference(KEY_HALO_TEXT_BUBBLE_COLOR);
mHaloPingColor =
(Preference) prefSet.findPreference(KEY_HALO_PING_COLOR);

mCustomLabel = findPreference(PREF_CUSTOM_CARRIER_LABEL);
updateCustomLabelTextSummary();

Expand Down Expand Up @@ -301,31 +288,10 @@ public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preferen
Settings.System.putInt(mContext.getContentResolver(),
Settings.System.HALO_REVERSED, mHaloReversed.isChecked()
? 1 : 0);
} else if (preference == mHaloPause) {
} else if (preference == mHaloPause) {
Settings.System.putInt(mContext.getContentResolver(),
Settings.System.HALO_PAUSE, mHaloPause.isChecked()
? 1 : 0);
} else if (preference == mHaloButtonColor) {
ColorPickerDialog cp = new ColorPickerDialog(getActivity(),
mButtonColorListener, Settings.System.getInt(mContext.getContentResolver(),
Settings.System.HALO_BUTTON_COLOR, 0x00000000));
cp.setDefaultColor(0x00000000);
cp.show();
return true;
} else if (preference == mHaloTextBubbleColor) {
ColorPickerDialog cp = new ColorPickerDialog(getActivity(),
mTextBubbleColorListener, Settings.System.getInt(mContext.getContentResolver(),
Settings.System.HALO_TEXT_BUBBLE_COLOR, 0x00000000));
cp.setDefaultColor(0x00000000);
cp.show();
return true;
} else if (preference == mHaloPingColor) {
ColorPickerDialog cp = new ColorPickerDialog(getActivity(),
mPingColorListener, Settings.System.getInt(mContext.getContentResolver(),
Settings.System.HALO_PING_COLOR, 0xff33b5e5));
cp.setDefaultColor(0xff33b5e5);
cp.show();
return true;
} else if (preference == mHaloGone) {
Settings.System.putInt(mContext.getContentResolver(),
Settings.System.HALO_GONE, mHaloGone.isChecked()
Expand Down Expand Up @@ -365,35 +331,5 @@ public void onClick(DialogInterface dialog, int whichButton) {
return super.onPreferenceTreeClick(preferenceScreen, preference);
}

ColorPickerDialog.OnColorChangedListener mButtonColorListener =
new ColorPickerDialog.OnColorChangedListener() {
public void colorChanged(int color) {
Settings.System.putInt(getContentResolver(),
Settings.System.HALO_BUTTON_COLOR, color);
}
public void colorUpdate(int color) {
}
};

ColorPickerDialog.OnColorChangedListener mTextBubbleColorListener =
new ColorPickerDialog.OnColorChangedListener() {
public void colorChanged(int color) {
Settings.System.putInt(getContentResolver(),
Settings.System.HALO_TEXT_BUBBLE_COLOR, color);
}
public void colorUpdate(int color) {
}
};

ColorPickerDialog.OnColorChangedListener mPingColorListener =
new ColorPickerDialog.OnColorChangedListener() {
public void colorChanged(int color) {
Settings.System.putInt(getContentResolver(),
Settings.System.HALO_PING_COLOR, color);
}
public void colorUpdate(int color) {
}
};

}

0 comments on commit 5c13830

Please sign in to comment.