Skip to content

Commit

Permalink
修复一些问题
Browse files Browse the repository at this point in the history
  • Loading branch information
aa112901 committed Jan 12, 2017
1 parent fc7f5c5 commit ef2c71f
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 3,167 deletions.
14 changes: 7 additions & 7 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,20 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" 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/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" 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/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" 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/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" 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/bundles" />
Expand Down
33 changes: 17 additions & 16 deletions app/src/main/java/com/wm/remusic/widget/SimpleWidgetProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,21 +172,21 @@ public void onFailureImpl(DataSource dataSource) {
}


public void onEnabled(Context context) {
Log.e(TAG,"onenabled = " + isInUse);
super.onEnabled(context);

isInUse = true;
Log.e(TAG,"onenabled = " + isInUse);

}
//当最后一个该Widget删除是调用该方法,注意是最后一个
public void onDisabled(Context context) {
Log.e(TAG,"ondisable = " + isInUse);
super.onDisabled(context);
isInUse = false;
Log.e(TAG,"ondisable = " + isInUse);
}
// public void onEnabled(Context context) {
// Log.e(TAG,"onenabled = " + isInUse);
// super.onEnabled(context);
//
// isInUse = true;
// Log.e(TAG,"onenabled = " + isInUse);
//
// }
// //当最后一个该Widget删除是调用该方法,注意是最后一个
// public void onDisabled(Context context) {
// Log.e(TAG,"ondisable = " + isInUse);
// super.onDisabled(context);
// isInUse = false;
// Log.e(TAG,"ondisable = " + isInUse);
// }

@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager,
Expand All @@ -212,9 +212,10 @@ public void onReceive(Context context, Intent intent) {
this.onEnabled(context);
}
else if (AppWidgetManager.ACTION_APPWIDGET_DISABLED.equals(action)) {
isInUse = false;
this.onDisabled(context);
}
Log.e(TAG,"action = " + action);
Log.e(TAG,"action = " + action + " isinuse = " + isInUse);
if(!isInUse){
return;
}
Expand Down
Binary file removed remusic.zip
Binary file not shown.
233 changes: 0 additions & 233 deletions remusic/AddNetPlaylistDialog.java

This file was deleted.

Loading

0 comments on commit ef2c71f

Please sign in to comment.