Compare commits
1 Commits
i2p-androi
...
2.7.1
Author | SHA1 | Date | |
---|---|---|---|
a06b449bfb |
@ -11,6 +11,7 @@
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
|
||||
<!-- following two are for UPnP -->
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
|
||||
@ -29,7 +30,10 @@
|
||||
android:icon="@drawable/ic_launcher_itoopie"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name">
|
||||
android:label="@string/app_name"
|
||||
android:foregroundServiceType="specialUse">
|
||||
<property android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
|
||||
android:value="i2p_router_background_process_required_network_operation"/>
|
||||
<intent-filter>
|
||||
<action android:name="net.i2p.android.router.service.IRouterState" />
|
||||
</intent-filter>
|
||||
|
@ -19,7 +19,7 @@ import android.view.ViewGroup;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.viewpagerindicator.TitlePageIndicator;
|
||||
//import com.viewpagerindicator.TitlePageIndicator;
|
||||
|
||||
import net.i2p.android.i2ptunnel.preferences.EditTunnelContainerFragment;
|
||||
import net.i2p.android.i2ptunnel.util.TunnelUtil;
|
||||
@ -52,7 +52,7 @@ public class TunnelsContainer extends Fragment implements
|
||||
private boolean mTwoPane;
|
||||
|
||||
ViewPager mViewPager;
|
||||
TitlePageIndicator mPageIndicator;
|
||||
//TitlePageIndicator mPageIndicator;
|
||||
FragmentPagerAdapter mFragPagerAdapter;
|
||||
|
||||
private static final String FRAGMENT_CLIENT = "client_fragment";
|
||||
@ -82,7 +82,7 @@ public class TunnelsContainer extends Fragment implements
|
||||
View v = inflater.inflate(R.layout.container_tunnels, container, false);
|
||||
|
||||
mViewPager = (ViewPager) v.findViewById(R.id.pager);
|
||||
mPageIndicator = (TitlePageIndicator) v.findViewById(R.id.page_indicator);
|
||||
//mPageIndicator = (TitlePageIndicator) v.findViewById(R.id.page_indicator);
|
||||
mNewTunnel = (ImageButton) v.findViewById(R.id.promoted_action);
|
||||
mNewTunnel.setVisibility(showActions() ? View.VISIBLE : View.GONE);
|
||||
|
||||
@ -111,7 +111,7 @@ public class TunnelsContainer extends Fragment implements
|
||||
mViewPager.setAdapter(mFragPagerAdapter);
|
||||
|
||||
// Bind the page indicator to the pager.
|
||||
mPageIndicator.setViewPager(mViewPager);
|
||||
//mPageIndicator.setViewPager(mViewPager);
|
||||
|
||||
mNewTunnel.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -20,7 +20,7 @@ import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.viewpagerindicator.TitlePageIndicator;
|
||||
//import com.viewpagerindicator.TitlePageIndicator;
|
||||
|
||||
import net.i2p.android.router.R;
|
||||
import net.i2p.android.router.util.NamingServiceUtil;
|
||||
@ -92,10 +92,10 @@ public class AddressbookContainer extends Fragment
|
||||
|
||||
if (!mTwoPane) {
|
||||
mViewPager = (ViewPager) v.findViewById(R.id.pager);
|
||||
TitlePageIndicator pageIndicator = (TitlePageIndicator) v.findViewById(R.id.page_indicator);
|
||||
//TitlePageIndicator pageIndicator = (TitlePageIndicator) v.findViewById(R.id.page_indicator);
|
||||
mFragPagerAdapter = new AddressbookPagerAdapter(getActivity(), getChildFragmentManager());
|
||||
mViewPager.setAdapter(mFragPagerAdapter);
|
||||
pageIndicator.setViewPager(mViewPager);
|
||||
//pageIndicator.setViewPager(mViewPager);
|
||||
}
|
||||
|
||||
return v;
|
||||
|
@ -1,5 +1,7 @@
|
||||
package net.i2p.android.router.service;
|
||||
|
||||
import static android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
@ -173,11 +175,18 @@ public class RouterService extends Service {
|
||||
// We need to *not* check if we're restarting on Android greater than Oreo due to
|
||||
// changes in how notifications work and the use of NotificationChannels.
|
||||
if(!restart) {
|
||||
startForeground(1337, _statusBar.getNote());
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
||||
startForeground(1337, _statusBar.getNote(), FOREGROUND_SERVICE_TYPE_SPECIAL_USE);
|
||||
} else {
|
||||
startForeground(1337, _statusBar.getNote());
|
||||
}
|
||||
} else {
|
||||
if (Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||
startForeground(1337, _statusBar.getNote());
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
||||
startForeground(1337, _statusBar.getNote(), FOREGROUND_SERVICE_TYPE_SPECIAL_USE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -140,6 +140,7 @@ class StatusBar {
|
||||
mNotificationManager.createNotificationChannel(mNotificationChannel);
|
||||
mNotificationChannel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
||||
mNotifyBuilder.setChannelId(NOTIFICATION_CHANNEL_ID);
|
||||
//
|
||||
}
|
||||
mNotif = mNotifyBuilder.build();
|
||||
mNotificationManager.notify(ID, mNotif);
|
||||
|
@ -5,10 +5,6 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.viewpagerindicator.TitlePageIndicator
|
||||
android:id="@+id/page_indicator"
|
||||
style="@style/PagerIndicator" />
|
||||
|
||||
<!-- The main content view -->
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
|
@ -29,10 +29,6 @@
|
||||
android:layout_weight="2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.viewpagerindicator.TitlePageIndicator
|
||||
android:id="@+id/page_indicator"
|
||||
style="@style/PagerIndicator" />
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -4,17 +4,12 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.viewpagerindicator.TitlePageIndicator
|
||||
android:id="@+id/page_indicator"
|
||||
style="@style/PagerIndicator" />
|
||||
|
||||
<!-- The main content view -->
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_below="@id/page_indicator" />
|
||||
android:layout_alignParentBottom="true" />
|
||||
|
||||
<net.i2p.android.ext.floatingactionbutton.AddFloatingActionButton
|
||||
android:id="@+id/promoted_action"
|
||||
|
@ -19,7 +19,7 @@ ANDROID_BUILD_SDK_VERSION=34
|
||||
|
||||
I2P_VERSION=2.7.0
|
||||
I2P_ANDROID_VERSION=2.7.0
|
||||
I2P_ANDROID_VERSION_CODE=4745286
|
||||
I2P_ANDROID_VERSION_CODE=4745288
|
||||
android.disableAutomaticComponentCreation=true
|
||||
android.useAndroidX=true
|
||||
#android.enableJetifier=true
|
Reference in New Issue
Block a user