forked from LineageOS/android_device_oneplus_sm8250-common
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sm8250-common: Add support for OnePlus Camera & Gallery
* Camera repo: https://gitlab.com/cjh1249131356/vendor_oneplus_camera Signed-off-by: cjh1249131356 <cjh1249131356@gmail.com>
- Loading branch information
1 parent
96ca846
commit e8c3528
Showing
34 changed files
with
599 additions
and
0 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,9 @@ | ||
java_library { | ||
name: "oplus-fwk", | ||
installable: true, | ||
|
||
srcs: [ | ||
"src/**/*.aidl", | ||
"src/**/*.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,25 @@ | ||
package android.app; | ||
|
||
import android.os.RemoteException; | ||
|
||
import com.oplus.app.OplusAppInfo; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class OplusActivityManager { | ||
|
||
private static OplusActivityManager sOplusActivityManager = null; | ||
private static ArrayList<OplusAppInfo> sTopAppInfos = new ArrayList<OplusAppInfo>(); | ||
|
||
public static OplusActivityManager getInstance() { | ||
if (sOplusActivityManager == null) { | ||
sOplusActivityManager = new OplusActivityManager(); | ||
} | ||
return sOplusActivityManager; | ||
} | ||
|
||
public List<OplusAppInfo> getAllTopAppInfos() throws RemoteException { | ||
return (ArrayList<OplusAppInfo>) sTopAppInfos.clone(); | ||
} | ||
} |
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,43 @@ | ||
package android.app.job; | ||
|
||
public interface IJobInfoExt { | ||
|
||
public final class JobBuilderExt { | ||
|
||
public boolean mIsOplusJob; | ||
|
||
public JobBuilderExt setRequiresBattIdle(boolean requiresBattIdle, int extra) { | ||
return this; | ||
} | ||
} | ||
|
||
default boolean getBooleanConstraint(String type, boolean defValue) { | ||
return defValue; | ||
} | ||
|
||
default String getStringConstraint(String type, String defValue) { | ||
return defValue; | ||
} | ||
|
||
default int getIntConstraint(String type, int defValue) { | ||
return defValue; | ||
} | ||
|
||
default long getLongConstraint(String type, long defValue) { | ||
return defValue; | ||
} | ||
|
||
default void setBooleanConstraint(String type, boolean value) {} | ||
|
||
default void setStringConstraint(String type, String value) {} | ||
|
||
default void setIntConstraint(String type, int value) {} | ||
|
||
default void setLongConstraint(JobInfo job, String type, long value) {} | ||
|
||
default void initJobInfo(Object in) {} | ||
|
||
default void initJobInfoPure(JobBuilderExt jobBuilderExt) {} | ||
|
||
default void writeToParcelJobInfo(Object out, int flags) {} | ||
} |
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,14 @@ | ||
package android.common; | ||
|
||
import android.common.OplusFeatureList; | ||
|
||
public interface IOplusCommonFeature { | ||
|
||
default OplusFeatureList.OplusIndex index() { | ||
return OplusFeatureList.OplusIndex.End; | ||
} | ||
|
||
default IOplusCommonFeature getDefault() { | ||
return null; | ||
} | ||
} |
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,8 @@ | ||
package android.common; | ||
|
||
public class OplusFeatureList { | ||
|
||
public enum OplusIndex { | ||
End | ||
} | ||
} |
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,13 @@ | ||
package android.common; | ||
|
||
public class OplusFrameworkFactory { | ||
|
||
private static OplusFrameworkFactory sOplusFrameworkFactory = null; | ||
|
||
public static OplusFrameworkFactory getInstance() { | ||
if (sOplusFrameworkFactory == null) { | ||
sOplusFrameworkFactory = new OplusFrameworkFactory(); | ||
} | ||
return sOplusFrameworkFactory; | ||
} | ||
} |
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,6 @@ | ||
package android.view; | ||
|
||
public class OplusWindowManager { | ||
|
||
public OplusWindowManager() {} | ||
} |
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,6 @@ | ||
package com.oplus.app; | ||
|
||
public class OplusAppEnterInfo { | ||
|
||
public OplusAppEnterInfo() {} | ||
} |
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,6 @@ | ||
package com.oplus.app; | ||
|
||
public class OplusAppExitInfo { | ||
|
||
public OplusAppExitInfo() {} | ||
} |
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,6 @@ | ||
package com.oplus.app; | ||
|
||
public class OplusAppInfo { | ||
|
||
public OplusAppInfo() {} | ||
} |
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,8 @@ | ||
package com.oplus.app; | ||
|
||
import java.util.List; | ||
|
||
public class OplusAppSwitchConfig { | ||
|
||
public void addAppConfig(int type, List<String> list) {} | ||
} |
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,37 @@ | ||
package com.oplus.app; | ||
|
||
import android.content.Context; | ||
|
||
public class OplusAppSwitchManager { | ||
|
||
private static OplusAppSwitchManager sOplusAppSwitchManager = null; | ||
|
||
public static int APP_SWITCH_VERSION = 1; | ||
|
||
public static OplusAppSwitchManager getInstance() { | ||
if (sOplusAppSwitchManager == null) { | ||
sOplusAppSwitchManager = new OplusAppSwitchManager(); | ||
} | ||
return sOplusAppSwitchManager; | ||
} | ||
|
||
public boolean registerAppSwitchObserver(Context context, | ||
OnAppSwitchObserver observer, OplusAppSwitchConfig config) { | ||
return true; | ||
} | ||
|
||
public boolean unregisterAppSwitchObserver(Context context, OnAppSwitchObserver observer) { | ||
return true; | ||
} | ||
|
||
public interface OnAppSwitchObserver { | ||
|
||
void onActivityEnter(OplusAppEnterInfo oplusAppEnterInfo); | ||
|
||
void onActivityExit(OplusAppExitInfo oplusAppExitInfo); | ||
|
||
void onAppEnter(OplusAppEnterInfo oplusAppEnterInfo); | ||
|
||
void onAppExit(OplusAppExitInfo oplusAppExitInfo); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
oplus-fwk/src/com/oplus/content/OplusFeatureConfigManager.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,17 @@ | ||
package com.oplus.content; | ||
|
||
public class OplusFeatureConfigManager { | ||
|
||
public static OplusFeatureConfigManager sOplusFeatureConfigManager = null; | ||
|
||
public static OplusFeatureConfigManager getInstance() { | ||
if (sOplusFeatureConfigManager == null) { | ||
sOplusFeatureConfigManager = new OplusFeatureConfigManager(); | ||
} | ||
return sOplusFeatureConfigManager; | ||
} | ||
|
||
public boolean hasFeature(String name) { | ||
return false; | ||
} | ||
} |
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,19 @@ | ||
package com.oplus.orms; | ||
|
||
import com.oplus.orms.info.OrmsSaParam; | ||
|
||
public class OplusResourceManager { | ||
|
||
private static OplusResourceManager sOplusResourceManager = null; | ||
|
||
public static OplusResourceManager getInstance(Class clazz) { | ||
if (sOplusResourceManager == null) { | ||
sOplusResourceManager = new OplusResourceManager(); | ||
} | ||
return sOplusResourceManager; | ||
} | ||
|
||
public long ormsSetSceneAction(OrmsSaParam ormsSaParam) { | ||
return -1L; | ||
} | ||
} |
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,8 @@ | ||
package com.oplus.orms.info; | ||
|
||
public class OrmsSaParam { | ||
|
||
public OrmsSaParam() {} | ||
|
||
public OrmsSaParam(String scene, String action, int timeout) {} | ||
} |
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,8 @@ | ||
package com.oplus.os; | ||
|
||
public class OplusBuild { | ||
|
||
public static int getOplusOSVERSION() { | ||
return 23; | ||
} | ||
} |
Oops, something went wrong.