-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SVN] r3205 Inventory in /Libraries/twister-lib-android/
[MOD] Use latest support library (28.0.0) in the app [EXP] TWiStErRob/net.twisterrob.inventory#164 work around NotificationCompat.Builder's deprecated constructor via FAKE_CHANNEL_ID [REM] TWiStErRob/net.twisterrob.inventory#164 Inline deprecated methods to use their API 14+ equivalents. [EXP] Polyfill getLoadManager/getSupportLoaderManager in variants to reduce changes. [REM] LoaderManager.mWho reflective accesses as that field doesn't exist any more. [REF] Rewrite EdgeEffect related debug helpers for Android SDK instead of deprecated support lib version.
- Loading branch information
1 parent
0c4e5cd
commit 9cb59da
Showing
7 changed files
with
150 additions
and
150 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,10 +1,4 @@ | ||
# net.twisterrob.android.utils.log.LoggingFragment.onActivityCreated(android.os.Bundle) | ||
# net.twisterrob.android.utils.log.LoggingFragment.getLoaderManager() | ||
# net.twisterrob.android.utils.log.LoggingActivity.onCreate(android.os.Bundle) | ||
-keepclassmembernames class android.support.v4.app.LoaderManagerImpl { | ||
java.lang.String mWho; | ||
} | ||
# net.twisterrob.android.utils.log.LoggingFragment.getName() | ||
# net.twisterrob.android.utils.log.FragmentNameStringer | ||
-keepclassmembernames class android.support.v4.app.Fragment { | ||
java.lang.String mWho; | ||
} |
75 changes: 0 additions & 75 deletions
75
...wister-lib-android/logging/src/main/java/android/support/v4/widget/EdgeEffectWrapper.java
This file was deleted.
Oops, something went wrong.
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
78 changes: 78 additions & 0 deletions
78
...ndroid/logging/src/main/java/net/twisterrob/android/utils/wrappers/EdgeEffectWrapper.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,78 @@ | ||
package net.twisterrob.android.utils.wrappers; | ||
|
||
import android.annotation.TargetApi; | ||
import android.content.Context; | ||
import android.graphics.Canvas; | ||
import android.os.Build.VERSION_CODES; | ||
import android.support.annotation.*; | ||
import android.widget.EdgeEffect; | ||
|
||
import net.twisterrob.java.annotations.DebugHelper; | ||
|
||
@RequiresApi(VERSION_CODES.ICE_CREAM_SANDWICH) | ||
@DebugHelper | ||
public class EdgeEffectWrapper extends EdgeEffect { | ||
|
||
private final @NonNull EdgeEffect effectImpl; | ||
|
||
/** | ||
* @param effectImpl {@link EdgeEffectCompat.EdgeEffectImpl} object | ||
* (type erased to {@link Object} because it's not public) | ||
*/ | ||
public EdgeEffectWrapper(@NonNull Context context, @NonNull EdgeEffect effectImpl) { | ||
super(context); | ||
this.effectImpl = effectImpl; | ||
} | ||
|
||
public @NonNull EdgeEffect getWrapped() { | ||
return effectImpl; | ||
} | ||
|
||
@Override public void setSize(int width, int height) { | ||
effectImpl.setSize(width, height); | ||
} | ||
|
||
@Override public boolean isFinished() { | ||
return effectImpl.isFinished(); | ||
} | ||
|
||
@Override public void finish() { | ||
effectImpl.finish(); | ||
} | ||
|
||
@Override public void onPull(float deltaDistance) { | ||
effectImpl.onPull(deltaDistance); | ||
} | ||
|
||
@Override public void onRelease() { | ||
effectImpl.onRelease(); | ||
} | ||
|
||
@Override public void onAbsorb(int velocity) { | ||
effectImpl.onAbsorb(velocity); | ||
} | ||
|
||
@Override public boolean draw(Canvas canvas) { | ||
return effectImpl.draw(canvas); | ||
} | ||
|
||
@TargetApi(VERSION_CODES.LOLLIPOP) | ||
@Override public int getMaxHeight() { | ||
return effectImpl.getMaxHeight(); | ||
} | ||
|
||
@TargetApi(VERSION_CODES.LOLLIPOP) | ||
@Override public void setColor(int color) { | ||
effectImpl.setColor(color); | ||
} | ||
|
||
@TargetApi(VERSION_CODES.LOLLIPOP) | ||
@Override public int getColor() { | ||
return effectImpl.getColor(); | ||
} | ||
|
||
@TargetApi(VERSION_CODES.LOLLIPOP) | ||
@Override public void onPull(float deltaDistance, float displacement) { | ||
effectImpl.onPull(deltaDistance, displacement); | ||
} | ||
} |
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