Skip to content

Commit

Permalink
Some SDK adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
torkildr committed Nov 18, 2012
1 parent e7203f4 commit c5e97c2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="no.trommelyd.android" android:versionName="2.1"
android:installLocation="auto" android:versionCode="13">
package="no.trommelyd.android" android:versionName="2.2"
android:installLocation="auto" android:versionCode="14">

<!-- Meta data -->

<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="16" />
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="17" />

<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="false" />

<supports-screens android:anyDensity="true" />

<application android:icon="@drawable/snare" android:label="@string/app_name">
<application android:icon="@drawable/snare" android:label="@string/app_name" android:allowBackup="true">

<!-- Activities -->

<activity android:name=".TrommelydActivity" android:label="@string/app_name"
android:theme="@style/DrumsoundTheme">
<intent-filter>
Expand Down
2 changes: 1 addition & 1 deletion project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
# project structure.

# Project target.
target=android-14
target=android-17
android.library.reference.1=E:/Program Files (x86)/Android/ActionBarSherlock/library
4 changes: 2 additions & 2 deletions src/com/hlidskialf/android/preference/SeekBarPreference.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected View onCreateDialogView() {
mValueText.setGravity(Gravity.CENTER_HORIZONTAL);
mValueText.setTextSize(mTextSize);
params = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.FILL_PARENT,
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
layout.addView(mValueText, params);
}
Expand All @@ -77,7 +77,7 @@ protected View onCreateDialogView() {
mSeekBar = new SeekBar(mContext);
mSeekBar.setOnSeekBarChangeListener(this);
layout.addView(mSeekBar, new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.FILL_PARENT,
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT));

if (shouldPersist())
Expand Down
6 changes: 3 additions & 3 deletions src/no/trommelyd/android/TrommelydPlayerService.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,14 @@ private void handleCommand(Intent intent) {
// Backwards compatibility for API < 5
@Override
public void onStart(Intent intent, int startId) {
Log.d("Trommelyd", "Command (API < 5) from intent: " + intent.toURI());
Log.d("Trommelyd", "Command (API < 5) from intent: " + intent.toUri(0));
handleCommand(intent);
}

// Used for API >= 5
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Log.d("Trommelyd", "Command from intent: " + intent.toURI());
Log.d("Trommelyd", "Command from intent: " + intent.toUri(0));
handleCommand(intent);

// Throw away when killed
Expand All @@ -220,7 +220,7 @@ public int onStartCommand(Intent intent, int flags, int startId) {
// Give a simple binder for local calls
@Override
public IBinder onBind(Intent intent) {
Log.d("Trommelyd", "Service bound from intent: " + intent.toURI());
Log.d("Trommelyd", "Service bound from intent: " + intent.toUri(0));
return mBinder;
}

Expand Down
6 changes: 3 additions & 3 deletions src/no/trommelyd/android/TrommelydSensorListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public void onAccuracyChanged(Sensor sensor, int accuracy) {
@Override
public void onSensorChanged(SensorEvent event) {
// Acceleration in all directions
float x = event.values[SensorManager.DATA_X];
float y = event.values[SensorManager.DATA_Y];
float z = event.values[SensorManager.DATA_Z];
float x = event.values[0];
float y = event.values[1];
float z = event.values[2];

// Store last acceleration
mLastAcceleration = mCurrentAcceleration;
Expand Down

0 comments on commit c5e97c2

Please sign in to comment.