Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

again fix #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ app/.classpath
app/.settings
app/.project
.project
.settings
.settings
.vscode
23 changes: 16 additions & 7 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -62,31 +62,40 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-runtime-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-verifier" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-resources" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/split-apk" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
Expand Down
52 changes: 26 additions & 26 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
android:name="com.csipsimple.ui.SipHome"
android:label="@string/app_name"
android:launchMode="singleTask"
android:theme="@style/DarkTheme"
android:theme="@style/Theme.AppCompat"
android:uiOptions="splitActionBarWhenNarrow" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down Expand Up @@ -173,7 +173,7 @@
android:label="@string/app_name"
android:launchMode="singleTask"
android:targetActivity="com.csipsimple.ui.SipHome"
android:theme="@style/DarkTheme"
android:theme="@style/Theme.AppCompat"
android:uiOptions="splitActionBarWhenNarrow" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
Expand Down Expand Up @@ -249,24 +249,24 @@
<!-- Main ui -->
<activity
android:name="com.csipsimple.ui.calllog.CallLogDetailsActivity"
android:theme="@style/DarkTheme" />
android:theme="@style/Theme.AppCompat" />

<!-- Accounts -->
<activity
android:name="com.csipsimple.ui.filters.AccountFilters"
android:configChanges="orientation"
android:label="@string/filters"
android:theme="@style/DarkTheme" />
android:theme="@style/Theme.AppCompat" />
<activity
android:name="com.csipsimple.ui.filters.EditFilter"
android:configChanges="orientation"
android:label="@string/filters"
android:theme="@style/DarkTheme" />
android:theme="@style/Theme.AppCompat" />
<activity
android:name="com.csipsimple.wizards.WizardChooser"
android:configChanges="orientation"
android:label="@string/choose_wizard"
android:theme="@style/DarkTheme.Dialog" />
android:theme="@style/Theme.AppCompat.Dialog" />

<!-- Preferences -->
<activity
Expand All @@ -275,7 +275,7 @@
android:enabled="@bool/use_hc_prefs"
android:label="@string/prefs"
android:permission="android.permission.CONFIGURE_SIP"
android:theme="@style/DarkTheme" >
android:theme="@style/Theme.AppCompat" >
<intent-filter>
<action android:name="com.csipsimple.ui.action.PREFS_GLOBAL" />

Expand All @@ -288,7 +288,7 @@
android:enabled="@bool/use_cupcake_prefs"
android:label="@string/prefs"
android:permission="android.permission.CONFIGURE_SIP"
android:theme="@style/DarkTheme" >
android:theme="@style/Theme.AppCompat" >
<intent-filter>
<action android:name="com.csipsimple.ui.action.PREFS_GLOBAL" />

Expand All @@ -298,18 +298,18 @@
<activity
android:name="com.csipsimple.ui.prefs.cupcake.PrefsLoaderActivity"
android:label=""
android:theme="@style/DarkTheme" />
android:theme="@style/Theme.AppCompat" />
<activity
android:name="com.csipsimple.ui.prefs.PrefsFilters"
android:configChanges="orientation"
android:label="@string/filters"
android:theme="@style/DarkTheme" />
android:theme="@style/Theme.AppCompat" />
<activity
android:name="com.csipsimple.ui.prefs.PrefsFast"
android:configChanges="orientation"
android:label="@string/prefs_fast"
android:permission="android.permission.CONFIGURE_SIP"
android:theme="@style/DarkTheme.Dialog" >
android:theme="@style/Theme.AppCompat.Dialog" >
<intent-filter>
<action android:name="com.csipsimple.ui.action.PREFS_FAST" />

Expand All @@ -320,19 +320,19 @@
android:name="com.csipsimple.ui.prefs.Codecs"
android:configChanges="orientation"
android:label="@string/codecs"
android:theme="@style/DarkTheme" />
android:theme="@style/Theme.AppCompat" />
<activity
android:name="com.csipsimple.ui.prefs.AudioTester"
android:label="@string/test_audio"
android:screenOrientation="portrait"
android:theme="@style/DarkTheme.Dialog" />
android:theme="@style/Theme.AppCompat.Dialog" />

<!-- Wizards -->
<activity
android:name="com.csipsimple.wizards.BasePrefsWizard"
android:configChanges="orientation"
android:label="@string/edit"
android:theme="@style/DarkTheme" />
android:theme="@style/Theme.AppCompat" />

<!-- Call management -->
<receiver
Expand All @@ -356,7 +356,7 @@
android:permission="android.permission.USE_SIP"
android:process=":sipStack"
android:taskAffinity=""
android:theme="@style/DarkTheme.Dialog" >
android:theme="@style/Theme.AppCompat.Dialog" >
<intent-filter>
<action android:name="android.intent.action.CALL" />

Expand Down Expand Up @@ -384,7 +384,7 @@
android:launchMode="singleTask"
android:permission="android.permission.CALL_PRIVILEGED"
android:targetActivity="com.csipsimple.ui.outgoingcall.OutgoingCallChooser"
android:theme="@style/DarkTheme.Dialog" >
android:theme="@style/Theme.AppCompat.Dialog" >
<intent-filter>
<action android:name="android.intent.action.CALL_PRIVILEGED" />

Expand All @@ -402,7 +402,7 @@
android:launchMode="singleTask"
android:permission="android.permission.CALL_PRIVILEGED"
android:targetActivity="com.csipsimple.ui.outgoingcall.OutgoingCallChooser"
android:theme="@style/DarkTheme.Dialog" >
android:theme="@style/Theme.AppCompat.Dialog" >
<intent-filter>
<action android:name="android.intent.action.CALL_PRIVILEGED" />

Expand Down Expand Up @@ -440,7 +440,7 @@
android:permission="android.permission.CONFIGURE_SIP"
android:process=":sipStack"
android:taskAffinity=""
android:theme="@style/DarkTheme.NoTitle" >
android:theme="@style/Theme.AppCompat" >
<intent-filter android:priority="10" >
<action android:name="com.csipsimple.phone.action.INCALL" />

Expand All @@ -451,13 +451,13 @@
android:name="com.csipsimple.ui.PickupSipUri"
android:configChanges="orientation"
android:label="@string/pickup_sip_uri"
android:theme="@style/DarkTheme" />
android:theme="@style/Theme.AppCompat" />
<activity
android:name="com.csipsimple.ui.incall.InCallMediaControl"
android:configChanges="orientation"
android:label="@string/prefs_media"
android:taskAffinity="com.csipsimple.ui.incall.InCallActivity"
android:theme="@style/DarkTheme.Dialog" />
android:theme="@style/Theme.AppCompat.Dialog" />

<receiver android:name="com.csipsimple.service.HeadsetButtonReceiver" />

Expand All @@ -479,7 +479,7 @@

<activity
android:name="com.csipsimple.widgets.AccountWidgetConfigure"
android:theme="@style/DarkTheme" >
android:theme="@style/Theme.AppCompat" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter>
Expand All @@ -500,7 +500,7 @@

<activity
android:name="com.csipsimple.widgets.ShortcutWidgetConfigure"
android:theme="@style/DarkTheme" >
android:theme="@style/Theme.AppCompat" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter>
Expand All @@ -511,7 +511,7 @@
android:name="com.csipsimple.ui.messages.MessageActivity"
android:configChanges="orientation"
android:launchMode="singleTop"
android:theme="@style/DarkTheme"
android:theme="@style/Theme.AppCompat"
android:windowSoftInputMode="stateHidden" />

<!-- Embedded plugins -->
Expand Down Expand Up @@ -540,10 +540,10 @@
<activity
android:name="com.csipsimple.ui.account.AccountsEditList"
android:label="@string/accounts"
android:theme="@style/DarkTheme" />
android:theme="@style/Theme.AppCompat" />
<activity
android:name="com.csipsimple.ui.account.AccountEdit"
android:theme="@style/DarkTheme" />
android:theme="@style/Theme.AppCompat" />

<!-- Extra codecs -->

Expand All @@ -567,7 +567,7 @@
<!-- Extra wizard creation account activities -->
<activity
android:name="com.csipsimple.wizards.impl.MondotalkCreate"
android:theme="@style/DarkTheme" />
android:theme="@style/Theme.AppCompat" />

<!--Test -->
<instrumentation android:targetPackage="com.csipsimple"
Expand Down
20 changes: 11 additions & 9 deletions app/src/main/java/com/csipsimple/ui/SipHome.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
package com.csipsimple.ui;

import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.app.AlertDialog;
import android.content.ComponentName;
import android.content.Context;
Expand All @@ -41,10 +42,11 @@
import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;

import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
Expand Down Expand Up @@ -140,19 +142,19 @@ protected void onCreate(Bundle savedInstanceState) {



Tab dialerTab = ab.newTab()
ActionBar.Tab dialerTab = ab.newTab()
.setContentDescription(R.string.dial_tab_name_text)
.setIcon(R.drawable.ic_ab_dialer_holo_dark);
Tab callLogTab = ab.newTab()
ActionBar.Tab callLogTab = ab.newTab()
.setContentDescription(R.string.calllog_tab_name_text)
.setIcon(R.drawable.ic_ab_history_holo_dark);
Tab favoritesTab = null;
ActionBar.Tab favoritesTab = null;
if(CustomDistribution.supportFavorites()) {
favoritesTab = ab.newTab()
.setContentDescription(R.string.favorites_tab_name_text)
.setIcon(R.drawable.ic_ab_favourites_holo_dark);
}
Tab messagingTab = null;
ActionBar.Tab messagingTab = null;
if (CustomDistribution.supportMessaging()) {
messagingTab = ab.newTab()
.setContentDescription(R.string.messages_tab_name_text)
Expand Down Expand Up @@ -276,7 +278,7 @@ public Fragment getItem(int position) {
}

@Override
public void onTabSelected(Tab tab, FragmentTransaction ft) {
public void onTabSelected(ActionBar.Tab tab, FragmentTransaction ft) {
clearDetails();
if (mViewPager.getCurrentItem() != tab.getPosition()) {
mViewPager.setCurrentItem(tab.getPosition(), true);
Expand All @@ -296,12 +298,12 @@ public void onPageSelected(int position) {
}

@Override
public void onTabReselected(Tab tab, FragmentTransaction ft) {
public void onTabReselected(ActionBar.Tab tab, FragmentTransaction ft) {
// Nothing to do
}

@Override
public void onTabUnselected(Tab tab, FragmentTransaction ft) {
public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction ft) {
// Nothing to do
}

Expand Down Expand Up @@ -698,7 +700,7 @@ private void selectTabWithAction(Intent intent) {
String callAction = intent.getAction();
if (!TextUtils.isEmpty(callAction)) {
ActionBar ab = getSupportActionBar();
Tab toSelectTab = null;
ActionBar.Tab toSelectTab = null;
Integer toSelectId = null;
if (callAction.equalsIgnoreCase(SipManager.ACTION_SIP_DIALER)
|| callAction.equalsIgnoreCase(Intent.ACTION_DIAL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ public void onVisibilityChanged(boolean visible) {
mShowOptionsMenu = visible;
// Invalidate the options menu since we are changing the list of
// options shown in it.
AppCompatActivity activity = getActivity();
if (activity != null) {
activity.invalidateOptionsMenu();
}
// AppCompatActivity activity = getActivity();
// if (activity != null) {
// activity.invalidateOptionsMenu();
// }
}


Expand Down Expand Up @@ -291,7 +291,7 @@ public void placeCall(String number, Long accId) {
if(accId != null) {
it.putExtra(SipProfile.FIELD_ACC_ID, accId);
}
getActivity().startActivity(it);
// getActivity().startActivity(it);
}
}

Expand All @@ -300,7 +300,7 @@ public void placeCall(String number, Long accId) {

private void turnOnActionMode() {
Log.d(THIS_FILE, "Long press");
mMode = getSherlockActivity().startActionMode(new CallLogActionMode());
mMode = getActivity().startActionMode(new CallLogActionMode());
ListView lv = getListView();
lv.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

Expand All @@ -311,7 +311,7 @@ private class CallLogActionMode implements ActionMode.Callback {
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
Log.d(THIS_FILE, "onCreateActionMode");
getSherlockActivity().getSupportMenuInflater().inflate(R.menu.call_log_menu, menu);
getActivity().getMenuInflater().inflate(R.menu.call_log_menu, menu);
return true;
}

Expand Down
Loading