• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

development


Commit MetaInfo

Revision4b7c4677642eb3d446924de5a52fc035c72eb7eb (tree)
Time2011-01-25 08:33:40
AuthorJeff Brown <jeffbrown@goog...>
CommiterAndroid Git Automerger

Log Message

am 24e38f1b: Merge "Add WindowOrientationListener log enable/disable checkbox." into honeycomb

* commit '24e38f1bef4d8600c64029ce20f9ee7d9d6201a5':

Add WindowOrientationListener log enable/disable checkbox.

Change Summary

Incremental Difference

--- a/apps/Development/res/layout/development_settings.xml
+++ b/apps/Development/res/layout/development_settings.xml
@@ -161,7 +161,14 @@
161161 android:layout_below="@id/font_hinting"
162162 android:layout_alignParentLeft="true"
163163 android:text="@string/development_settings_show_xmpp_text" />
164-
164+
165+ <CheckBox android:id="@+id/window_orientation_listener_log"
166+ android:layout_width="wrap_content"
167+ android:layout_height="wrap_content"
168+ android:layout_below="@id/show_xmpp"
169+ android:layout_alignParentLeft="true"
170+ android:text="@string/development_settings_window_orientation_listener_log" />
171+
165172 </RelativeLayout>
166173
167174 </ScrollView>
--- a/apps/Development/res/values/strings.xml
+++ b/apps/Development/res/values/strings.xml
@@ -113,6 +113,7 @@
113113 <string name="development_settings_debug_app_label_text">Debug App:</string>
114114 <string name="development_settings_show_sleep_text">Show sleep state on LED</string>
115115 <string name="development_settings_keep_screen_on_text">Keep screen on while plugged in</string>
116+ <string name="development_settings_window_orientation_listener_log">Enable window orientation listener log</string>
116117
117118 <string name="monkey_screen_initialActivity_text"></string>
118119 <string name="monkey_screen_number_of_events_label">Number of Events: </string>
--- a/apps/Development/src/com/android/development/DevelopmentSettings.java
+++ b/apps/Development/src/com/android/development/DevelopmentSettings.java
@@ -64,6 +64,7 @@ public class DevelopmentSettings extends Activity {
6464 private CheckBox mShowBackgroundCB;
6565 private CheckBox mShowSleepCB;
6666 private CheckBox mShowXmppCB;
67+ private CheckBox mWindowOrientationListenerLogCB;
6768 private CheckBox mCompatibilityModeCB;
6869 private Spinner mMaxProcsSpinner;
6970 private Spinner mWindowAnimationScaleSpinner;
@@ -74,6 +75,7 @@ public class DevelopmentSettings extends Activity {
7475 private boolean mWaitForDebugger;
7576 private boolean mAlwaysFinish;
7677 private int mPointerLocation;
78+ private int mWindowOrientationListenerLog;
7779 private int mProcessLimit;
7880 private boolean mShowSleep;
7981 private boolean mShowXmpp;
@@ -136,6 +138,8 @@ public class DevelopmentSettings extends Activity {
136138 mShowSleepCB.setOnClickListener(mShowSleepClicked);
137139 mShowXmppCB = (CheckBox)findViewById(R.id.show_xmpp);
138140 mShowXmppCB.setOnClickListener(mShowXmppClicked);
141+ mWindowOrientationListenerLogCB = (CheckBox)findViewById(R.id.window_orientation_listener_log);
142+ mWindowOrientationListenerLogCB.setOnClickListener(mWindowOrientationListenerLogClicked);
139143 mCompatibilityModeCB = (CheckBox)findViewById(R.id.compatibility_mode);
140144 mCompatibilityModeCB.setOnClickListener(mCompatibilityModeClicked);
141145 mMaxProcsSpinner = (Spinner)findViewById(R.id.max_procs);
@@ -203,6 +207,7 @@ public class DevelopmentSettings extends Activity {
203207 updateFlingerOptions();
204208 updateSleepOptions();
205209 updateXmppOptions();
210+ updateWindowOrientationListenerLogOptions();
206211 updateCompatibilityOptions();
207212
208213 try {
@@ -261,6 +266,17 @@ public class DevelopmentSettings extends Activity {
261266 mPointerLocationSpinner.setSelection(mPointerLocation);
262267 }
263268
269+ private void writeWindowOrientationListenerLogOptions() {
270+ Settings.System.putInt(getContentResolver(),
271+ Settings.System.WINDOW_ORIENTATION_LISTENER_LOG, mWindowOrientationListenerLog);
272+ }
273+
274+ private void updateWindowOrientationListenerLogOptions() {
275+ mWindowOrientationListenerLog = Settings.System.getInt(getContentResolver(),
276+ Settings.System.WINDOW_ORIENTATION_LISTENER_LOG, 0);
277+ mWindowOrientationListenerLogCB.setChecked(mWindowOrientationListenerLog != 0);
278+ }
279+
264280 // Returns the current state of the system property that controls
265281 // strictmode flashes. One of:
266282 // 0: not explicitly set one way or another
@@ -478,6 +494,13 @@ public class DevelopmentSettings extends Activity {
478494 }
479495 };
480496
497+ private View.OnClickListener mWindowOrientationListenerLogClicked = new View.OnClickListener() {
498+ public void onClick(View v) {
499+ mWindowOrientationListenerLog = ((CheckBox)v).isChecked() ? 1 : 0;
500+ writeWindowOrientationListenerLogOptions();
501+ }
502+ };
503+
481504 private Spinner.OnItemSelectedListener mPointerLocationChanged
482505 = new Spinner.OnItemSelectedListener() {
483506 public void onItemSelected(android.widget.AdapterView av, View v,