Permalink
Browse files

2.2.2 beta

Fix issue 215
  • Loading branch information...
1 parent ee22242 commit acc91d050f631ad386252b0d0e43fc617bb9dd59 pmerle71 committed May 19, 2011
View
@@ -25,8 +25,8 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.sipdroid.sipua"
- android:versionName="2.2.1 beta"
- android:versionCode="84"
+ android:versionName="2.2.2 beta"
+ android:versionCode="85"
android:installLocation="auto">
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/>
<supports-screens
@@ -85,6 +85,11 @@
<data android:scheme="imto" />
<data android:scheme="sip" />
</intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.CALL_PRIVILEGED" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:scheme="sip" />
+ </intent-filter>
</activity>
<activity android:name="org.sipdroid.sipua.ui.Activity2" android:label="@string/app_name"
android:excludeFromRecents="true" android:taskAffinity=""/>
@@ -37,7 +37,7 @@
int rightSamplesWritten = 0;
// The positions of the first sample data byte.
long sampleDataOffset;
- byte[] buf = new byte[5000];
+ byte[] buf = new byte[10000];
public WavWriter(String filename,int sample_rate)
{
@@ -64,6 +64,7 @@
final int MSG_ANSWER_SPEAKER = 2;
final int MSG_BACK = 3;
final int MSG_TICK = 4;
+ final int MSG_POPUP = 5;
final int SCREEN_OFF_TIMEOUT = 12000;
@@ -167,11 +168,8 @@ else if ((PreferenceManager.getDefaultSharedPreferences(mContext).getBoolean(org
mHandler.sendEmptyMessageDelayed(MSG_ANSWER_SPEAKER, 10000);
break;
case UserAgent.UA_STATE_INCALL:
- if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
- mDialerDrawer.close();
- mDialerDrawer.setVisibility(View.GONE);
- } else
- mDialerDrawer.setVisibility(View.VISIBLE);
+ mDialerDrawer.close();
+ mDialerDrawer.setVisibility(View.VISIBLE);
if (Receiver.docked <= 0)
screenOff(true);
break;
@@ -187,6 +185,7 @@ else if ((PreferenceManager.getDefaultSharedPreferences(mContext).getBoolean(org
if (Receiver.ccCall != null) mCallCard.displayMainCallStatus(ccPhone,Receiver.ccCall);
if (mSlidingCardManager != null) mSlidingCardManager.showPopup();
mHandler.sendEmptyMessage(MSG_TICK);
+ mHandler.sendEmptyMessage(MSG_POPUP);
if (t == null && Receiver.call_state != UserAgent.UA_STATE_IDLE) {
mDigits.setText("");
running = true;
@@ -266,6 +265,9 @@ else if (RtpStreamSender.m == 2)
} else
mStats.setVisibility(View.GONE);
break;
+ case MSG_POPUP:
+ if (mSlidingCardManager != null) mSlidingCardManager.showPopup();
+ break;
}
}
};
@@ -404,12 +406,7 @@ public void run() {
Receiver.ccCall.setState(Call.State.ACTIVE);
Receiver.ccCall.base = SystemClock.elapsedRealtime();
mCallCard.displayMainCallStatus(ccPhone,Receiver.ccCall);
- if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
- mDialerDrawer.close();
- mDialerDrawer.setVisibility(View.GONE);
- } else {
- mDialerDrawer.setVisibility(View.VISIBLE);
- }
+ mDialerDrawer.setVisibility(View.VISIBLE);
if (mSlidingCardManager != null)
mSlidingCardManager.showPopup();
}
@@ -36,7 +36,7 @@ void callPSTN(String uri) {
number = uri.substring(uri.indexOf(":")+1);
if (!number.equals("")) {
Intent intent = new Intent(Intent.ACTION_CALL,
- Uri.fromParts("tel", Uri.decode(number)+
+ Uri.fromParts(Uri.decode(number).contains("@")?"sipdroid":"tel", Uri.decode(number)+
(PreferenceManager.getDefaultSharedPreferences(this).getString(Settings.PREF_PREF, Settings.DEFAULT_PREF).equals(Settings.VAL_PREF_PSTN) ? "+" : ""), null));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
Caller.noexclude = SystemClock.elapsedRealtime();
@@ -329,16 +329,9 @@ private void setDefaultValues() {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
- // Get the content of the directory
- profileFiles = getProfileList();
-
- // Create menu items - show only if there are already some profiles
- if (profileFiles != null && profileFiles.length > 0) {
- menu.add(0, MENU_IMPORT, 0, getString(R.string.settings_profile_menu_import)).setIcon(android.R.drawable.ic_menu_upload);
- menu.add(0, MENU_EXPORT, 0, getString(R.string.settings_profile_menu_export)).setIcon(android.R.drawable.ic_menu_save);
- menu.add(0, MENU_DELETE, 0, getString(R.string.settings_profile_menu_delete)).setIcon(android.R.drawable.ic_menu_delete);
- }
-
+ menu.add(0, MENU_IMPORT, 0, getString(R.string.settings_profile_menu_import)).setIcon(android.R.drawable.ic_menu_upload);
+ menu.add(0, MENU_EXPORT, 0, getString(R.string.settings_profile_menu_export)).setIcon(android.R.drawable.ic_menu_save);
+ menu.add(0, MENU_DELETE, 0, getString(R.string.settings_profile_menu_delete)).setIcon(android.R.drawable.ic_menu_delete);
return true;
}

0 comments on commit acc91d0

Please sign in to comment.