-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #170 from shankari/implement_runtime_permissions
Implement runtime permissions
- Loading branch information
Showing
13 changed files
with
364 additions
and
135 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package edu.berkeley.eecs.emission.cordova.tracker; | ||
|
||
import android.content.Context; | ||
import android.content.Intent; | ||
|
||
/* | ||
* After API 26, android does not support delivery of implicit intents. | ||
* We use broadcast intents extensively in the FSM, so instead of changing every location, | ||
* we create an explicit intent that sets the package name correctly and converts it to an implicit intent. | ||
* And while we are here, we can also simplify the arguments passed in to the interface | ||
*/ | ||
|
||
public class ExplicitIntent extends Intent { | ||
public ExplicitIntent(Context context, int actionId) { | ||
super(context.getString(actionId)); | ||
setPackage(context.getPackageName()); | ||
} | ||
|
||
public ExplicitIntent(Context context, String actionString) { | ||
super(actionString); | ||
setPackage(context.getPackageName()); | ||
} | ||
|
||
public ExplicitIntent(Context context, Intent intent) { | ||
super(intent); | ||
setPackage(context.getPackageName()); | ||
} | ||
} |
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
Oops, something went wrong.