Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
HMBSbige committed Nov 4, 2019
1 parent a5ae310 commit ae73cb7
Showing 1 changed file with 4 additions and 55 deletions.
Original file line number Diff line number Diff line change
@@ -1,42 +1,4 @@
package com.github.shadowsocks;
/*
* Shadowsocks - A shadowsocks client for Android
* Copyright (C) 2014 <max.c.lv@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
* ___====-_ _-====___
* _--^^^#####// \\#####^^^--_
* _-^##########// ( ) \\##########^-_
* -############// |\^^/| \\############-
* _/############// (@::@) \\############\_
* /#############(( \\// ))#############\
* -###############\\ (oo) //###############-
* -#################\\ / VV \ //#################-
* -###################\\/ \//###################-
* _#/|##########/\######( /\ )######/\##########|\#_
* |/ |#/\#/\#/\/ \#/\##\ | | /##/\#/ \/\#/\#/\#| \|
* ` |/ V V ` V \#\| | | |/#/ V ' V V \| '
* ` ` ` ` / | | | | \ ' ' ' '
* ( | | | | )
* __\ | | | | /__
* (vvv(VVV)(VVV)vvv)
*
* HERE BE DRAGONS
*
*/

import android.app.KeyguardManager;
import android.app.NotificationChannel;
Expand Down Expand Up @@ -64,9 +26,6 @@
import java.util.List;
import java.util.Locale;

/**
* @author Mygod
*/
public class ShadowsocksNotification {

private Service service;
Expand All @@ -82,12 +41,12 @@ public class ShadowsocksNotification {
private IShadowsocksServiceCallback.Stub callback = new IShadowsocksServiceCallback.Stub() {

@Override
public void stateChanged(int state, String profileName, String msg) throws RemoteException {
public void stateChanged(int state, String profileName, String msg) {
// Ignore
}

@Override
public void trafficUpdated(long txRate, long rxRate, long txTotal, long rxTotal) throws RemoteException {
public void trafficUpdated(long txRate, long rxRate, long txTotal, long rxTotal) {
String txr = TrafficMonitor.INSTANCE.formatTraffic(txRate);
String rxr = TrafficMonitor.INSTANCE.formatTraffic(rxRate);
builder.setContentText(String.format(Locale.ENGLISH, service.getString(R.string.traffic_summary), txr, rxr));
Expand All @@ -104,7 +63,7 @@ public void trafficUpdated(long txRate, long rxRate, long txTotal, long rxTotal)
private boolean isVisible = true;

/**
* loca receiver
* lock receiver
*/
private BroadcastReceiver lockReceiver = new BroadcastReceiver() {
@Override
Expand Down Expand Up @@ -172,10 +131,6 @@ public void destroy() {
nm.cancel(1);
}

public void setVisible(boolean visible) {
setVisible(visible, false);
}

public void setVisible(boolean visible, boolean forceShow) {
if (isVisible != visible) {
isVisible = visible;
Expand Down Expand Up @@ -213,13 +168,7 @@ private void registerLockReceiver(Service service, boolean visible) {
}

private void initWithUpdateAction() {
String action;
if (Build.VERSION.SDK_INT < 20) {
action = pm.isScreenOn() ? Intent.ACTION_SCREEN_ON : Intent.ACTION_SCREEN_OFF;
} else {
action = pm.isInteractive() ? Intent.ACTION_SCREEN_ON : Intent.ACTION_SCREEN_OFF;
}
// upate
String action = pm.isInteractive() ? Intent.ACTION_SCREEN_ON : Intent.ACTION_SCREEN_OFF;
update(action, true);
}

Expand Down

0 comments on commit ae73cb7

Please sign in to comment.