-
-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop'
- Loading branch information
Showing
31 changed files
with
394 additions
and
123 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...c/main/java/com/cretin/www/cretinautoupdatelibrary/activity/UpdateBackgroundActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.cretin.www.cretinautoupdatelibrary.activity; | ||
|
||
import android.content.Context; | ||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.view.Gravity; | ||
import android.view.WindowManager; | ||
|
||
import com.cretin.www.cretinautoupdatelibrary.interfaces.AppDownloadListener; | ||
import com.cretin.www.cretinautoupdatelibrary.model.DownloadInfo; | ||
import com.cretin.www.cretinautoupdatelibrary.utils.RootActivity; | ||
|
||
public class UpdateBackgroundActivity extends RootActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
getWindow().setGravity(Gravity.LEFT | Gravity.TOP); | ||
WindowManager.LayoutParams attributes = getWindow().getAttributes(); | ||
attributes.x = 0; | ||
attributes.y = 0; | ||
attributes.height = 1; | ||
attributes.width = 1; | ||
|
||
download(); | ||
finish(); | ||
} | ||
|
||
@Override | ||
public AppDownloadListener obtainDownloadListener() { | ||
return null; | ||
} | ||
|
||
/** | ||
* 启动Activity | ||
* | ||
* @param context | ||
* @param info | ||
*/ | ||
public static void launch(Context context, DownloadInfo info) { | ||
launchActivity(context, info, UpdateBackgroundActivity.class); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.